开发者

Select files between two dates

开发者 https://www.devze.com 2023-04-13 08:59 出处:网络
@echo off forfiles /p \"C:\\Documents and Settings\\Test\\Downloads\" /d +01/07/2011 /d -15/07/2011 /c \"cmd /c echo @file\"
@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.开发者_如何学Python 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
    )
)
0

精彩评论

暂无评论...
验证码 换一张
取 消