batch file - FORFILES less than 4 days old -


so i'm having trouble trying figure out forfiles. i'm trying files no more 4 days old. less 4 days. not seem quite possible since /d -4 gets items 4 days or older.

below have far.

forfiles /p t:\downloads /m *.exe /c "cmd /c copy @path t:\downloads\applications | echo copying @path" /d +4 

anyone know if possible? or maybe better alternative?

this might work you:

@echo off &setlocal cd /d "t:\downloads" (for %%a in (*.exe) @echo "%%~a")>dir.txt /f "delims=" %%a in ('forfiles /d -4 /m *.exe ^|findstr /vig:/ dir.txt') echo copying %%a&copy "%%~a" "t:\downloads\applications" del dir.txt 

unfortunately doesn't work in xp.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

debian - 500 Error upon login into Plesk Admin - auth.php3? -