View Full Version : File - execute -> Working Directory
mtway
12-09-2002, 05:06 PM
In the File - Execute command is there a way to may the "Working Directory" default to be the same as the path in "File to execute" path ?
We are dynamically setting the .exe to execute and there is not an easy way to extract the path from it and set it into the working directory that I have found.
thx
Corey
12-09-2002, 05:31 PM
Sure it's easy to do in a number of ways, but as to your first question, simply use a variable. So for example if you set the variable %path% to contain a value such as "C:Windows\Desktop\Folder\" (Whether you set that variable dynamically or not is irrelevant) then just use %path% as your working directory...
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
mtway
12-09-2002, 07:54 PM
I have a variable with "C:\some\path\somewhere\some.exe"
but I don't have "C:\some\path\somewhere\", short of adding more registry entries to have the path I see no functions that will give me the path given the above string ???
I would like to avoid adding more registry stuff since the path is there I just have to get it out of the .exe string....
Corey
12-09-2002, 08:50 PM
Actually it's very simple to use a string function such as LEFT to extract that subpath. But again, if you store only the path in the variable you can use it for both, whichever you prefer...
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
mtway
12-10-2002, 10:10 AM
Sorry I was just blind and couldn't see String.ParsePath !!! right in the list
Corey
12-10-2002, 02:40 PM
Glad you got what you needed...
Corey Milner
Creative Director, Indigo Rose Software (http://www.indigorose.com)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.