Computing.Net > Forums > Disk Operating System > dos 6.22 copy command

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.

dos 6.22 copy command

Reply to Message Icon

Name: ml
Date: March 21, 2001 at 05:25:40 Pacific
Comment:

Can someone tell me why when you use copy to combine files (copy text1.txt+text2.txt newtext.txt)the new file is not the same size as the sum of the original files?



Sponsored Link
Ads by Google

Response Number 1
Name: Ayexby
Date: March 21, 2001 at 12:52:34 Pacific
Reply:


If you use the /b switch, the new file will be the same length as the sum of the two files.

According to DOS help, when combining files, the ASCII file type is the default, wheras binary is the default for copying a single file to a new name. And, when an ascii file is created, a CTRL-Z character is added to the end. If you dump the file contents, you'll see the 1A (26) (=CTRL/Z) character tacked on to the end.


0

Response Number 2
Name: Laurence
Date: March 22, 2001 at 09:54:38 Pacific
Reply:

Three handy COPY commands:
To "touch" a file: COPY/B filespec+,,
To add an EOF char: COPY/A filespec/B+,,
To remove an EOF char: COPY/B filespec/A+,,

Add/remove work only at the last char position. Embedded EOF chars have
to be dealt with by other means.

Otherwise, debug can be used to your advantage. I'm not up to snuff on the details, but you can ask in news:alt.msdos.batch .


Batfiles: The DOS batch file programming handbook


0

Response Number 3
Name: Dan
Date: June 12, 2001 at 06:40:32 Pacific
Reply:

Laurence,

Thanks for the info! Your post allowed me to install an application on a laptop using only the copy command! (Very handy when it doesn't have a floppy and the only program on the machine is COMMAND.COM). Basically, I chopped the file up at the -Z places, sent each piece over, appended a -Z, and used copy to recombine them. Success! Thanks!


0

Response Number 4
Name: Jo Jones
Date: March 15, 2002 at 05:02:11 Pacific
Reply:

what the copy command used to copy directories


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







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: dos 6.22 copy command

DOS 6.22 Copying hidden, missing files? www.computing.net/answers/dos/dos-622-copying-hidden-missing-files/16888.html

Copying DOS 6.22 to 5.0 www.computing.net/answers/dos/copying-dos-622-to-50/11087.html

unable to load Dos 6.22 over win95 www.computing.net/answers/dos/unable-to-load-dos-622-over-win95/1242.html