<p>I want to create a compiled JavaScript file for my website.  For development I would prefer to keep the JavaScript in separate files and just as part of my automated scripts  concatenate the files into one and run the compressor over it.</p>

<p>My problem is that if I use the old DOS copy command it also puts in the EOF markers which the compressor complains about:</p>

<p>copy /A *.js compiled.js /Y</p>

<p>What are other people doing?</p>

To copy without EOF use binary mode:
```
```
copy /B *.js compiled.js /Y
```
```
If the resulting file still has EOFs, that might have come from one of original files,
it can be fixed by this variant:
```
```
copy /A *.js compiled.js /B /Y
```
```
/A removes trailing EOFs from original files if any and /B prevents appending EOF to the resulting file. If an EOF is not at the end, the source file will be truncated at it. The order of switches is important. If you write
```
```
copy /A *.js /B compiled.js /Y
```
```
- EOFs in source files won't be removed but still resulting EOF won't be appended.
Try it yourself, thats where I get it. DOS commands are weird.