PDA

View Full Version : Set Working Dir for system()


Synthesizer
05-20-2007, 08:08 AM
Hi,

I'm working on a script that needs to call an external program to process some images. I put the images into the same folder as the program, and then I need to call it with some arguments. This all goes fine up until the point where the program tries finding a file it needs. The file is sitting right there beside it, so I'm assuming that the current path is not set to the folder I am working in. How would I change this?

Doing system("cd C:/pathname"); does work.

Hope someone can help :)

StephG
05-22-2007, 09:46 PM
Try:

string $dirname = "C:/pathname";
workspace -dir $dirName;

CGTalk Moderation
05-22-2007, 09:46 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.