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

Wow. Thank alot. Dont even have to call modules ...
Note to myself read about subroutines functions again...
Subroutines

Thanks
MH

  • Comment on Re^2: Win32: Deleting Temporary directories of all users on a machine (recursive)?

Replies are listed 'Best First'.
Re^3: Win32: Deleting Temporary directories of all users on a machine (recursive)?
by Marshall (Canon) on Jan 13, 2010 at 12:00 UTC
    If you wanna module, then... rmtree() in File::Path seems to work pretty well.
    #!/usr/bin/perl -w use strict; use Data::Dumper; use File::Path; my $Dir2Delete = 'C:/temp/JUNK'; rmtree( $Dir2Delete, { verbose => 1, error => \my $err_list } ); print Dumper $err_list; #should be $VAR1 = [];, ie null