在两个日期之间选择文件 [英] Select files between two dates
本文介绍了在两个日期之间选择文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
forfiles / pC:\Documents and Settings\Test\Downloads/ d +01/07/2011 / d -15 / 07/2011 / ccmd / c echo @file
pause
你好, / p>
我想选择01/07/11和15/07/11之间修改的所有文件(法语:jj / mm / aaaa或美国:dd / mm / yyyy )。但是/ d参数只能使用一次。如何做到这一点?
感谢您能帮助我。 :)
解决方案
这不是特定命令的选项。您可以将选择作为FOR循环的输入。为您需要的每个条件添加另一个缩写。
FOR / Fdelims = *%% A IN('forfiles / d -05/07/2011')DO(
FOR / Fdelims = *%% B IN('forfiles / m %% A / d +05/01/2011')DO(
ECHO %% B
)
)
@echo off
forfiles /p "C:\Documents and Settings\Test\Downloads" /d +01/07/2011 /d -15/07/2011 /c "cmd /c echo @file"
pause
Hello,
I would like to select all files modified between 01/07/11 and 15/07/11 (French : jj/mm/aaaa or USA : dd/mm/yyyy). But the "/d" parameter can be used only one time. How can I do that ?
Thanks if you can help me. :)
解决方案
This is not an option for that particular command. You could use the selection as input to a FOR loop. Add another indention for each criteria you need.
FOR /F "delims=*" %%A IN ('forfiles /d -05/07/2011') DO (
FOR /F "delims=*" %%B IN ('forfiles /m %%A /d +05/01/2011') DO (
ECHO %%B
)
)
这篇关于在两个日期之间选择文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文