SPAWN and strings [message #73380] |
Fri, 05 November 2010 03:49 |
Ludo
Messages: 7 Registered: May 2008
|
Junior Member |
|
|
I'm running IDL 7.1 on Windows XP SP2
I tried this in the command line (cmd.exe) :
> "C:\Program Files\myDir\myProg.exe" "C:\directory name with spaces\myFile.h5"
It works.
When I try the same command with SPAWN, it doesn't work. (I put spaces
around ' and " for an easy reading, in my command there aren't any
spaces.)
SPAWN, ' "C:\Program Files\myDir\myProg.exe" "C:\directory name with
spaces\myFile.h5" '
It tries to lauch C:\Program, just like there weren't any quotes
( " ). I have the impression that SPAWN can't handle more than two "
in a string. Why ?
As expected, if my working directory is "C:\directory name with
spaces", the following instruction works perfectly :
SPAWN, ' "C:\Program Files\myDir\myProg.exe" myFile.h5'
This one fails :
SPAWN, ' "C:\Program Files\myDir\myProg.exe" "myFile.h5" '
Did I miss something ? Some trick in strings management ?
|
|
|