Computing.Net > Forums > Disk Operating System > The copy command problem

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

The copy command problem

Reply to Message Icon

Name: charles_cp
Date: April 21, 2003 at 23:07:07 Pacific
OS: win 2000 pro
CPU/Ram: 700/256
Comment:

COPY I006_1.txt + I006_2.txt + I006_3.txt I006.txt

I use this command to combo three text file to the I006.txt. I discover the last line of the I006.txt have a square.

Have any batch command cam edit the text file and auto to delete the square?




Sponsored Link
Ads by Google

Response Number 1
Name: JackG
Date: April 22, 2003 at 12:51:42 Pacific
Reply:

The "square" is a DOS "end of file" character inserted by the DOS COPY command when copying TEXT files.

You seem to be working with (or expect) Binary files format (Windows tends to treat all files a Binary), so you must tell the DOS COPY command that you want a Binary file, not a Text file. (See COPY /? for help.)

Try:

COPY I006_1.txt + I006_2.txt + I006_3.txt /B I006.txt

If the input files are binary files and may contain the "end of file" character anywhere in the files, it may be necessary to include an additional /B before the list of files to be concatenated together, to prevent DOS COPY from truncating one or more of the files when it sees an "end of file" character 1Ah.


0

Response Number 2
Name: charles_cp
Date: April 22, 2003 at 22:54:15 Pacific
Reply:

Thank you


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Rename file with current ... dos batch file



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: The copy command problem

copy command in dos www.computing.net/answers/dos/copy-command-in-dos/12489.html

DOS copy command www.computing.net/answers/dos/dos-copy-command/12345.html

Need to re-write COPY command www.computing.net/answers/dos/need-to-rewrite-copy-command/1653.html