批 - 超过5分钟年长移动文件 [英] BATCH - Move files older than 5 minutes
问题描述
我要做出的举动有5分钟以上可执行文件。不知道如何比较文件VS系统日期的修改日期。
关闭@echo在%% F(* .LOG)做(此举%%〜nf.log \\ Procesados)出口
的一种方法是下载的findutils 和的coreutils 然后做到这一点:
gnu_find。型的F -mmin +05 -exec CP{}C:\\目的地;
这就是你需要的。日期计算的照顾也是如此。无需重新塑造自己的日期计算。
编辑按OP查询:
在下面的例子中找到当前目录下的所有文件搜索()
gnu_find。型的F -mmin +5 -exec CP{}C:\\目标\\文件夹;
但是,你可以指定要搜索的目录,你想:
gnu_find D:\\源\\文件夹型的F -mmin +5 -exec CP{}E:\\目标\\文件夹;
要了解FIND效用更多的选择,读到这里.....
I want to make a move executable files with more than 5 minutes. Do not know how to compare the modified date of the file VS the system date.
@echo off
for %%f in (*.log) do (
move %%~nf.log \Procesados
)
exit
One way is to download findutils and coreutils then do this:
gnu_find . -type f -mmin +05 -exec cp "{}" c:\destination ;
that's all you need. Date calculation is taken care of as well. No need to reinvent your own date calculation.
EDIT As per OP queries:
In below example FIND searches for all the files in current directory (.)
gnu_find . -type f -mmin +5 -exec cp "{}" C:\destination\folder ;
But, you can specify a directory to search as you wish:
gnu_find D:\source\folder -type f -mmin +5 -exec cp "{}" E:\destination\folder ;
To learn more options of FIND utility, read here.....
这篇关于批 - 超过5分钟年长移动文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!