use Win32::Perms; $Dir = 'd:\temp' unless( $Dir = $ARGV[0] ); $P = new Win32::Perms( $Dir ); # Set the all of the files called *.tmp in the specified directory $P->SetRecurse( "$Dir/*.tmp" ); print "Finished\n";