How can I combine the below multiple files into one file using the copy command?
Acks20100506200212.txt
Acks20100506210105.txt
Acks20100511190103.txt
Acks20100511200230.txt
The filenames change everyday with yyyymmdd and six random numbers. The destination file will be named acks.txt.
C:\test>type ken.bat
@echo off
set MM=%date:~4,2%
set DD=%date:~7,2%
set YYYY=%date:~10,4%
echo MM=%MM%
echo DD=%DD%
echo YYYY=%YYYY%
set ran=%random%
set ran=%random%66
set ran=%ran:~0,6%
echo ran=%ran%
echo hello > acks%yyyy%%mm%%dd%%ran%.txt
type acks%yyyy%%mm%%dd%%ran%.txt >> acks.txt
dir acks*.txt
C:\test>ken.bat
MM=05
DD=19
YYYY=2010
ran=323236
Volume in drive C has no label.
Volume Serial Number is 0652-E41D
Directory of C:\test
05/19/2010 06:24 PM 32 acks.txt
05/19/2010 06:24 PM 8 acks20100519144326.txt
05/19/2010 06:24 PM 8 acks20100519164486.txt
05/19/2010 06:24 PM 8 acks20100519297006.txt
05/19/2010 06:24 PM 8 acks20100519323236.txt
5 File(s) 64 bytes
0 Dir(s) 295,305,261,056 bytes free
C:\test>dir acks*
Volume in drive C has no label.
Volume Serial Number is 0652-E41D
Directory of C:\test
05/19/2010 06:54 PM 32 acks.txt
05/19/2010 06:24 PM 8 acks20100519144326.txt
05/19/2010 06:24 PM 8 acks20100519164486.txt
05/19/2010 06:24 PM 8 acks20100519297006.txt
05/19/2010 06:24 PM 8 acks20100519323236.txt
5 File(s) 64 bytes
0 Dir(s) 295,304,232,960 bytes free
C:\test>
type acks2010* >> acks.txt
acks20100519144326.txt
acks20100519164486.txt
acks20100519297006.txt
acks20100519323236.txt
C:\test>type acks.txt
hello
hello
hello
hello
C:\test>