@echo off set logFile=AmazonDeleteFiles.log
set Feeds="E:\AmazonProject\AmazonListing\AmazonListing.API\FeedsResult"
set Reorts="E:\AmazonProject\AmazonListing\AmazonListing.API\FeedsResult" echo --------- Amazon Delete Expired Files ------------ >> %logFile% echo Start (%date% %time%) >> %logFile% echo delete path %Feeds% 3 days , Please wait... >> %logFile%
forfiles /p "%Feeds%" /m *.* /d -3 >> %logFile%
forfiles /p "%Feeds%" /m *.* /d -3 /c "cmd /c del @path" >> %logFile% echo delete path %Reorts% 30 days , Please wait... >> %logFile%
forfiles /p "%Reorts%" /m *.* /d -30 >> %logFile%
forfiles /p "%Reorts%" /m *.* /d -30 /c "cmd /c del @path" >> %logFile% echo End (%date% %time%) >> %logFile%
exit