@echo off
if "%1"=="" goto _usage
set dst=.\.
if not "%2"=="" if exist %2\. (set dst=%2\.) else (goto _err1)
for /r %dst% %%f in (*.*) do if %%~tf LSS %1 Move /y %%f D:\backup\ && echo Move %%f
goto _quit
:_usage
echo DelOldFile.cmd move files before assigned folder and date
echo Version 1.0 Copyleft by Climbing
echo syntax: DelOldFile ^<Date^> [target Folder]
echo ^<Date^> Must assigned parameter,Date format:%date%,Files before the assigned date will be move(not include the assigned date)
echo [target Folder] Optional parameter,Assign the folder which files want to be moveed,default is current folder
goto _quit