...
system( "command \\path\\with spaces\\file" );
...
you'll may have problems with the spaces.
If you use the list form of the system function.
...
system( '\path\to\command.exe', '\path\with spaces\file' );
...
Note the use of 's rather than "s, to avoid the need to escape the backslashes.
cmd.exe will be bypassed and the spaces in the filename won't cause a problem. However, you will need to specify the full path of the command as well.
You can also avoid the need for using short filenames by quoting the filepath.
...
system( q[command "\path\with spaces\file" ] );
...
Which allows the shell to resolve the location of the command for you and forces it to see the quoted path as a single argument.
Note though, if your in an open environment, the risk entailed in allowing your shell to do this for you.
Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller
If I understand your problem, I can solve it! Of course, the same can be said for you.
|