I think you may need something in addition to DOS.
There are two ways to do this. One way is based on the file names, the other is based on file creation time.
METHOD 1 - File Name
# Script CopyButToday.txt
var str today, filelist, file
# Get today's date
set $today = gettime()
chex "8]" $today > $today
# Collect a list of all *.dat files in D:\New_Files.
lf -n "*.dat" "D:\New_Files" > $filelist
while ($filelist <> "")
do
lex "1" $filelist > $file
# Does this file have $today in its name ?
if ( { sen ("^"+$today+"^") $file } <= 0 )
# No file does not have $today in the name.
# Copy this file.
system copy ("\""+$file+"\"") "D:\test"
endif
done
METHOD 2 - File Creation Time
# Script CopyButToday.txt
var str today, filelist, file
# Get today's date
set $today = gettime()
chex "8]" $today > $today
# Collect a list of all *.dat files in D:\New_Files
# that have been created before $today
lf -n "*.dat" "D:\New_Files" ($fctime < $today) > $filelist
while ($filelist <> "")
do
lex "1" $filelist > $file
# Copy this file.
system copy ("\""+$file+"\"") "D:\test"
done
Both scripts are in biterscripting (
http://www.biterscripting.com ). Whichever method you choose, save the script in file C:/Scripts/CopyButToday.txt, start biterscripting, and enter the following command.
script "C:/Scripts/CopyButToday.txt"
That would do it.
If you make the scripts even fancier, please post them for others.