Hello,
i need to search all files having names *.app.h in directory C:SRC and sub directory and append the content of the files into a single file, newfile.txt.
I used,
xcopy C:\SRC\*app.h newfile.txt /s
But the probelm is the files are not appended but are overwritten and hence i only hav the last file in newfile.txt ?
Copy and append files into a single file
Moderator: DosItHelp
Re: Copy and append files into a single file
Is this any good?
Code: Select all
@echo off
for /r "C:\SRC\" %%a in (*app.h) do type "%%a" >>newfile.txt
Re: Copy and append files into a single file
Thanks a lot command works perfectly .....
Re: Copy and append files into a single file
if they have the same extension (ex: txt)
copy /b *.txt all.out
copy /b *.txt all.out