Jump to content
Sign in to follow this  
onestcoder

Dirctory paths

Recommended Posts

onestcoder

Ok this is a little hard to explain so I hope it makes since.

In the parent directory is my Main exe. Also in the directory there is an Includes folder

In a sub-folder Includes is the Second exe.

Also in that sub-directory Includes are more sub directories one for images images and one to hold my variable txt files vars.

My Main exe is a Gui that writes variables into includes\vars\vars.txt

The Main exe then runs the Second exe using includes\Second.exe

Inside the Second exe all the paths read vars\vars.txt and images\pictures.jpg

But the pictures and vars do not read into the exe right.

So here is my question: Even though the Second exe is in the Includes folder when the Main exe runs the Second exe is its starting folder the same as the Main exe??? For example should the Second exes paths be written the same as the Main exes paths even though is in the sub-folder???


Need a website: http://www.iconixmarketing.com

Share this post


Link to post
Share on other sites
ChrisL

Share this post


Link to post
Share on other sites
onestcoder

no i just used this in the second exe

$file = FileOpen("vars\powervars.txt", 0)
and
GUICtrlCreatePic("img\Obotz3.jpg", 5, 5, 170, 59)

it should start in the "Includes" dirctory

so should it look like

$file = FileOpen(@IncludesFilesDir &"vars\powervars.txt", 0)
Edited by onestcoder

Need a website: http://www.iconixmarketing.com

Share this post


Link to post
Share on other sites
ChrisL

My Main exe is a Gui that writes variables into “includes\vars\vars.txt”

The Main exe then runs the Second exe using “includes\Second.exe”

The part of your script where you call the second exe is what I am reffering to, if you Run the second exe with a working DIR as above then the second exe will open files relevant to its working directory.

If you dont specify a working directory for the second.exe with your run command then it will likely use file paths relevant to the main.exe which is one level higher.

Share this post


Link to post
Share on other sites
onestcoder

understood thank you very much


Need a website: http://www.iconixmarketing.com

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.