in reply to Win32: Deleting Temporary directories of all users on a machine (recursive)?

How about

my $dir = "C:/Dokumente und Einstellungen/user1/Lokale Einstellungen/T +emp"; $dir =~ s[/][\\]g; system qq[rd /s /q "$dir"];

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"
  • Comment on Re: Win32: Deleting Temporary directories of all users on a machine?
  • Download Code

Replies are listed 'Best First'.
Re^2: Win32: Deleting Temporary directories of all users on a machine?
by matze77 (Friar) on Jan 13, 2010 at 08:16 UTC

      The built-in rmdir function will only remove a directory if it is empty.

      del /s descends directories deleting the files, but leaves empty subdirectories in place.

      rd /s gets shot of everything (assuming permission).


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.