in reply to Re^2: system command can't spawn cmd.exe
in thread system command can't spawn cmd.exe

I've found protecting it with single quotes instead of double quotes often works. Something like:

$file=File::Spec->catfile('c:','path',with spaces',to','file'); $file="\'$file\'";