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.
COPY v/s TYPE command
Name: Ramakant Date: February 17, 2009 at 20:59:54 Pacific OS: Windows XP Subcategory: Batch
Comment:
Please tell me all the drawbacks associated with COPY and TYPE commands. I need to append data from one text file to another. Why TYPE command is better than the COPY command?
Name: Judago Date: February 17, 2009 at 23:38:49 Pacific
Reply:
Type will convert unicode into plain text, or at least it does with ascii acceptable characters, copy will keep it in the same format if it is unicode.
Other than that they should both do a similar job at appending one file to another provided you get syntax right. Copy can append multiple files at a time and use wildcards to do so, which can mean fewer commands in certain situations.
It's not really to say which better, but which is better suited to your situation.
0
Response Number 2
Name: Ramakant Date: February 18, 2009 at 00:56:36 Pacific
Reply:
Thanks a lot for providing this info. Actually I was facing problem while appending Unicode data into a text file. Will it create any problem (bug) if i use COPY command instead of TYPE command?
0
Response Number 3
Name: Mechanix2Go Date: February 18, 2009 at 01:01:50 Pacific
Reply:
Copy will combine ANY files. TYPE will choke on anything which is not TEXT.
===================================== If at first you don't succeed, you're about average.
M2
0
Response Number 4
Name: Judago Date: February 18, 2009 at 01:35:49 Pacific
Reply:
As long as you don't use the /b switch on copy to combine unicode text files all should be fine. If you do use the /b switch the two byte unicode identifier will appear in error at the append points.
It is however not a good idea to mix plain text into a unicode file or visa versa.
0
Response Number 5
Name: Ramakant Date: February 18, 2009 at 01:39:43 Pacific
Reply:
Thanks Judago San... I really appreciate your comments.
Summary: Is there an enhanced Type command which can read a specific line from a file? I need to process a csv file by each line as I have 3 different commands which need to run for each line. I will be using ...
Summary: How do I just plain copy a file in command prompt in Win XP home? it keeps on saying that the file doens't exist! I want to do this. Copy Game.exe to C:\Windows Please explain how I do that please!!!!...
Summary: How about this? ========================================================================== @ECHO OFF ECHO. ECHO Copying today's folder... FOR /F "tokens=2-4 DELIMS=/ " %%F IN ('date /T') DO (set v_da...