Monday, January 19, 2015

Temp Directory Delete Patch File Command

to delete temp directory files older than 2 days put the following command in .bat file 
and create scheduled task to run it every day once

forfiles -p  C:\Doc_Server_Temp\ -d -2 -c "cmd /c del @path"

where  C:\Doc_Server_Temp\ is the temp directory you want to delete its files.

No comments:

Post a Comment