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.
batch file to join files into one file
Name: kcozart Date: May 23, 2009 at 17:54:10 Pacific OS: Windows XP Subcategory: Batch
Comment:
Hello I am trying to make a batch file which will do the following: Scan for instance the F: drive and all of it subfolders and look for a file say app.bat and merge the contents of every find into a single text file for viewing. It would be good if wild cards could also be used for instance app*.bat. thanks I will keep trying to figure it out
for /r /d %%a in (.) do copy/b merge.txt+"%%a\*.bat" merge.txt
0
Response Number 2
Name: kcozart Date: May 24, 2009 at 12:28:02 Pacific
Reply:
It works great. But could you tell me how to show above each item found the path where found and put a separator between each find like below. f:\appf.bat $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Thanks for you help I really appreceiate it very much. I
0
Response Number 3
Name: kcozart Date: May 25, 2009 at 09:36:36 Pacific
Reply:
I came up with the batch file below with some help from someone else and it does what I wanted it to do. thanks
@echo off if exist merge.txt del merge.txt rem line below creates a file named merge.txt echo. >merge.txt for /r %%a in (app*.bat) do ( echo %%a >>merge.txt echo $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ >>merge.txt copy/b merge.txt+"%%a" merge.txt )
Summary: Hi, I want to combine two or more files into one file The first row is the header I want to strip the header in each file and then create a combine file. Now suppose I have file A,B,C Content of the...
Summary: Hi, In a folder I want to combine all the files with specific name in the filename into one Suppose I have file with name 092008AADD 102008AADD 082008AADD I want to combine the content of these files ...
Summary: OK. Got this cracked now. SN, many thanks for the suggestions & pointers re use of .inf files. I've now managed to execute automated registry clearances with a batch file using both the .reg and .i...