I have this commen issue with photoshop. Where it doesn't delete the temp files it creates after a shutdown of program.
I have used alot of time to find a script that would delete all files with starting name of Photoshop*
in the temp, which is older than 2 days. So i dont delete files, if i get a unexpected shutdown or crash.
I tried this, after a few hours of search - but it doenst work
ForFiles /p "C:\Users\user\AppData\Local\Temp\Photo*" /s /d -2 /c "cmd /c del @file"
This works, perfectly but it deletes all files without taking into consideration how old the files are.
C:\
del "C:\Users\user\AppData\Local\Temp\Photoshop*."
How can i get the above script, which runs on every startup with system rights.
To only delete all files starting with photoshop*
and are older than 2 days :)
I need this script to work on Windows10 and Windows7
Every input is appreciated.