我是编写脚本的新手。我需要帮助编写一个脚本,我将在下面详细描述:
答案 0 :(得分:0)
您可以使用FORFILES命令执行此操作。 (输入FORFILES /?作为文档)
:: Set this Variable to the command to email someone
SET MAILER=echo mail user -s
:: Set this variable to the number of days overdue to look for
SET OVERDUE=1
:: Set folder names here - these are relative to the current directory
SET FOLDERS= "C:\temp\BLANK" "C:\TEMP\New Folder"
:: Now loop through the folders
FOR /f "tokens=*" %%G in ('dir /b /s /a:d %FOLDERS%') do (
echo %%G
FORFILES /p "%%G" /s /d %OVERDUE% /c "cmd /c %MAILER% @file"
PAUSE
)
EXIT /b