ytiPerl:
Inside single quotes, a variable is not expanded, so you're running "rmdir /S /Q $foldername".
Try changing it to:
my $result = system("rmdir /S /Q $foldername");
Of course, if you have backslashes or spaces in the $foldername variable, then you'll get other problems. That's why you might want to consider using the list version of the system command, like:
my $result = system('rmdir', '/S', '/Q', $foldername);
...roboticus
When your only tool is a hammer, all problems look like your thumb. |