Computing.Net > Forums > Windows 2000 > To append files if the file exist

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.

To append files if the file exist

Reply to Message Icon

Name: Praveen
Date: October 4, 2005 at 11:23:36 Pacific
OS: windows 2000
CPU/Ram: 4 GB
Comment:

Hi All,
I have the following Batch script to append all the files into a single file.


cd C:\Simple\Test
type *.txt > C:\Result\Allfiles.txt
del *.txt

If the file Allfiles.txt already exists then it simple over writes the file. Can someone help me to make the changes so as to append to the existing file instead of over writing.

Thanks in advance,
Praveen



Sponsored Link
Ads by Google

Response Number 1
Name: Zenith
Date: October 4, 2005 at 14:49:40 Pacific
Reply:

Just add another > so you have >> like below will append the file.

cd C:\Simple\Test
type *.txt >> C:\Result\Allfiles.txt
del *.txt

98% of the population is asleep. The other 2% are staring around in complete amazement, abject terror, or both.


0

Response Number 2
Name: Praveen
Date: October 4, 2005 at 14:55:45 Pacific
Reply:

Thanks Zenith,
It worked fine.

Regards,
Praveen


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 Windows 2000 Forum Home


Sponsored links

Ads by Google


Results for: To append files if the file exist

CD Audio tracks to wav file www.computing.net/answers/windows-2000/cd-audio-tracks-to-wav-file/44867.html

Unable to Delete File www.computing.net/answers/windows-2000/unable-to-delete-file/46083.html

Trying to make batch / cmd file www.computing.net/answers/windows-2000/trying-to-make-batch-cmd-file/46373.html