2016-05-25

用批次檔 (Batch) 刪除指定天數之前 (過期) 所有子目錄及檔案

echo "Deleting old files ..."
forfiles /p D:\Temp /d -14 /c "cmd /c del /f /s /q @file"
echo "Deleting old directories ..."
forfiles /p D:\Temp /d -14 /c "cmd /c rd /s /q @file"