View Full Version : Set Working Dir for system()

05 May 2007, 07:08 AM

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 :)

05 May 2007, 08:46 PM

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

CGTalk Moderation
05 May 2007, 08: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.