Jump to content

Recommended Posts

Posted (edited)

cd %ALLUSERSPROFILE%
cd..
for /D /R %%i in (7z*.tmp) do rmdir /S /Q %%i

here's my batch file for deleting all temp directories in "Documents and Settings" folder and all subfolders

The thing is that the line

for /D /R %%i in (7z*.tmp) do rmdir /S /Q %%i

doesn't execute from "C:\Documents and Settings" folder

It executes from whete my batch file is!!!

So the whole script is useless.

Any suggestions??

UPD.:

Found a solution

cd /d %ALLUSERSPROFILE%
cd /d ..
for /D /R %%i in (7z*.tmp) do rmdir /S /Q %%~fsi

Edited by lsrkin

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...