eJames: I found your xcopy solution to work very well, indeed! The thing I like most about it is that it should work in Windows language versions other than English as well, since the format of the XCOPY parameters seems to be date-setting independent. Wonderful! ;]
One improvement would be to pre-create the FILES_TO_KEEP.TXT file so that if no file match the keep criteria, the second XCOPY statement can still go ahead and do the delete (it fails if it cannot find the FILES_TO_KEEP.TXT file). Here's my script (please note in this example I changed it to only delete *.pdf files and I also changed the temp file name to make more sure there are no potential conflicts, as well as cleaning up the temp file afterwards):
@echo off
SET OLDERTHAN=%1
IF NOT DEFINED OLDERTHAN GOTO SYNTAX
echo >> ~~~FILES_TO_KEEP.TXT~
for /f "tokens=*" %%a IN ('xcopy *.pdf /d:%1 /L /I null') do if exist %%~nxa echo %%~nxa >> ~~~FILES_TO_KEEP.TXT~
for /f "tokens=*" %%a IN ('xcopy *.pdf /L /I /EXCLUDE:~~~FILES_TO_KEEP.TXT~ null') do if exist "%%~nxa" del "%%~nxa"
del ~~~FILES_TO_KEEP.TXT~
GOTO END
:SYNTAX
ECHO.
ECHO USAGE:
ECHO DELOLD mm-dd-yyyy
ECHO Where mm-dd-yyyy is the date prior to which you want to delete files.
ECHO.
ECHO EX: "DELOLD 10-17-2008" Deletes files older than October 17, 2008.
ECHO.
ECHO This should work on any language version of Windows, but has only been
ECHO tested in English-US versions.
GOTO END
:END