c:\test 为要处理的文件夹,c:\test2\为复制目的文件夹。反下面一段命令,保存为.bat文件。 以下一段为处理2014年3月1日到2014.3.31的所有文件复制到c:\test2\里面。
for /r c:\test %%i in (*) do (
for /f "tokens=1" %%j in ("%%~ti") do (if "%%j" geq "2014-03-01" if "%%j" leq "2014-03-31" xcopy /d "%%~i" c:\test2\))