简体   繁体   English

使用批处理从文件夹中复制过去 2 小时修改过的文件

[英]copy last 2 hours modified files from the folder using batch

i want to copy files from the folder which was modified in last 2 hours.我想从过去 2 小时内修改过的文件夹中复制文件。 kindly provide me the batch script.请向我提供批处理脚本。 i have the folder name called E:folder1 and E:folder 2. Folder1 will have more files and keep receiving in this folder.我有名为 E:folder1 和 E:folder 2 的文件夹名称。Folder1 将有更多文件并继续在此文件夹中接收。 i want to copy last 2 hours files only from folder 1 and paste it in folder.我只想从文件夹 1 复制过去 2 小时的文件并将其粘贴到文件夹中。

you can try with FileTimeFilter.bat :你可以试试FileTimeFilter.bat

for /f "tokens=* delims=" %%# in ('filetimefiler.bat "E:\folder1" -hh -2') do (
   copy "%%~#" " E:\folder 2"
)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM