copy files but compare their dates first

June 11, 2009 at 07:33:14
Specs: Windows XP
copy files but compare their dates first
=============================
hi i searched web and your site for my answer but no where i found it.
i need a batch script to copy my files to "newer" folder but all files that i want to select should have been made in 12-24-2008
so they should be checked for their dates
here i found a scripts but i dont know how to use it it shows my files date in CMD window

For %%j in (*.*) Do Set FileDate=%%~tj
Set FileDate=%FileDate:~0,10%


See More: copy files but compare their dates first

Report •


#1
June 11, 2009 at 11:51:23
ok i found something but it's not working my files never move or copy why?

dir /a-d |find "12/24/2008" >filelist.txt
for /f %%i in (filelist.txt) do copy "%%i" "newer"

or this one

for /f "tokens=4" %%X in ('dir/a-d ^| find "12-24-2008"') do (
echo copy or move %%X newer
)

what's wrong?


Report •
Related Solutions


Ask Question