Spawn and XP [message #44868] |
Tue, 26 July 2005 13:09  |
raouldukey
Messages: 15 Registered: November 1999
|
Junior Member |
|
|
I am running IDL version 5.3 (yes I know how old it is). Years ago I
wrote a small program that would batch convert PS files to PDF, TIF,
JPEG, etc using the command prompt commands in GhostScript.
Essentially, I would use pickfile and grab the entire directory of PS
files, I would then parse out the filename, and spawn the command:
ps2pdf filename
and would just loop through my list of filenames. I had included the
GS directories in the system path, and it ran without problems. Until
I upgraded to XP last year, then I could no longer get this to work
properly.
I have added the GS directories to the system path variable, and have
confirmed that if I get a command prompt using <Run CMD> or <Run
Command> that I can do the <ps2pdf filename> and it works just fine.
However, when I try the same thing using spawn under XP, it doesn't do
anything (the dos window closes too quickly for me to figure out why
exactly). It seems as if the spawn command is using a dos shell that
doesn't acknowledge the path variable, but I am not sure.
Any help / suggestions? TIA
-Raoul
|
|
|
Re: Spawn and XP [message #44869 is a reply to message #44868] |
Tue, 26 July 2005 14:45  |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
By the way, you don't have any spaces in your path names, do you? That
always makes things interesting. You can usually cope with it by
wrapping the file names with the double quote character (").
--
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
|
|
|