foreach ( 7100 .. 7114 ) { my $path = File::Spec->catdir( $topdir, "$_/hosted/docs/cdm4/msoffice" ); my $cmd = "rmdir /s /q $path"; print "$cmd \n"; print `$cmd` . "\n"; } #### rmdir /s /q D:\sites\cust\7112\hosted\docs\cdm4\msoffice rmdir: failed to remove `/s': No such file or directory rmdir: failed to remove `/q': No such file or directory rmdir: failed to remove `D:\\sites\\cust\\7112\\hosted\\docs\\cdm4\\msoffice': Directory not empty #### D:\z>perl -v
This is perl, v5.10.0 built for MSWin32-x86-multi-thread