Computing.Net > Forums > Programming > What does this do?

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.

What does this do?

Reply to Message Icon

Name: danzawobble
Date: September 4, 2008 at 02:18:43 Pacific
OS: XP
CPU/Ram: 512
Product: DELL
Comment:

for %%A IN (*-brio.txt) DO type %%A >> Report.txt

Many thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: Judago
Date: September 4, 2008 at 02:27:54 Pacific
Reply:

It finds all files in the current directory that end in -brio.txt and appends all of the text in them into report.txt

It will only work if the file names don't contain spaces, however the below would work with file names that contain spaces, Provided it's Nt+ with extensions:

for %%A IN (*-brio.txt) DO type %%~sA >> Report.txt


0

Response Number 2
Name: danzawobble
Date: September 4, 2008 at 03:27:11 Pacific
Reply:

Many thanks!

If you've a moment could you let me know the sysntax to delete each file after its been appended to Report.txt.

My guess would be;

for %%A IN (*-brio.txt) del %%~A

Your time is very much appreciated!


0

Response Number 3
Name: Judago
Date: September 4, 2008 at 04:04:51 Pacific
Reply:

This should do it....


for %%A IN (*-brio.txt) DO type %%~sA >> Report.txt&&del %%~sA

There is one important thing to remember here, THESE FILES WILL BE PERMANENTLY DELETED!! THEY WILL NOT GO TO THE RECYCLYE BIN!!


0

Response Number 4
Name: danzawobble
Date: September 4, 2008 at 05:09:17 Pacific
Reply:

Understood. Many thanks for your time.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Unknown Device Batch to search in multip...



Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: What does this do?

what does this func do in C www.computing.net/answers/programming/what-does-this-func-do-in-c/9528.html

What does this command do? www.computing.net/answers/programming/what-does-this-command-do/19100.html

what's this visual basic error mean? www.computing.net/answers/programming/whats-this-visual-basic-error-mean/2667.html