Im having an issue replacing DELTree command I wrote a small batch file like 12 years ago or something for windows xp and ME and I want to use it on windows 10 to clear TEMP files and PREFETCH and others I would appreciate it if you tell me what is the replacement for the command
@ECHO OFF
deltree /y %systemroot%\temp\*.*
deltree /y %systemroot%\system\*.tmp
deltree /y %systemdrive%\*.tmp
deltree /y %systemroot%\*.tmp
deltree /y %systemroot%\Prefetch\*.*
deltree /y "%userprofile%\Recent\*.*"
deltree /y "%userprofile%\LocalS~1\Temp\*.*"
deltree /y c:\_restore d:\_restore o:\_restore
cls
EDIT- I already know and saw many other people asked same question but none had a correct or 100% working answer so after couple hours of testing and trying i finally go it done. Windows 10 Temp Cleaner
FOR /D %%p IN ("%systemroot%\temp\*.*") DO rmdir "%%p" /s /q
del %systemroot%\temp\*.* /F /Q
FOR /D %%p IN ("%systemroot%\system\*.tmp") DO rmdir "%%p" /s /q
del %systemroot%\system\*.tmp /F /Q
FOR /D %%p IN ("%systemdrive%\*.tmp") DO rmdir "%%p" /s /q
del %systemdrive%\*.tmp /F /Q
FOR /D %%p IN ("%systemroot%\*.tmp") DO rmdir "%%p" /s /q
del %systemroot%\*.tmp /F /Q
FOR /D %%p IN ("%systemroot%\Prefetch\*.*") DO rmdir "%%p" /s /q
del %systemroot%\Prefetch\*.* /F /Q
FOR /D %%p IN ("%userprofile%\LocalS~1\Temp\*.*") DO rmdir "%%p" /s /q
del %userprofile%\LocalS~1\Temp\*.* /F /Q
FOR /D %%p IN ("c:\_restore d:\_restore o:\_restore") DO rmdir "%%p" /s /q
del c:\_restore d:\_restore o:\_restore /F /Q