Jump to content
Sign in to follow this  
pjw73nh

@workingDir ?

Recommended Posts

pjw73nh

Greetings,

My exe file is called "workingdirtest.exe and is located in a folder called \\testmachine\test.

CODE
MsgBox(4096, "Update Not Needed", @WorkingDir)

RunWait(@ComSpec & " /c Dir /p & @workingDir")

When I run the exe, it displays the correct folder. ( \\testmachine\test ) in the msgbox.

When it runs the second line, it runs the DIR on my c:\windows folder.

I presume this is because my comspec variable is pointing to c:\windows?

How can I make it do a DIR of the actual working directory using a variable?

Thanks

P.

Share this post


Link to post
Share on other sites
BillLuvsU

try using the macro @ScriptDir


[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites
BillLuvsU

Ok, listen to JdeB, he's way smarter then I am. :shocked:


[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites
pjw73nh

Ok, listen to JdeB, he's way smarter then I am. :shocked:

Thanks JDEB & Fear1313

P.

Share this post


Link to post
Share on other sites
AutoItKing

So many people make stupid syntax mistakes. Check your code before you post. Duh!

And reading the help file never hurts.

Edited by AutoItKing

http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]

Share this post


Link to post
Share on other sites
GEOSoft

Adding to what JdeB posted

In the help file you will also find FileChangeDir() to set the working directory to the folder you want to check

Edit: Spelled the function name wrong

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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  

×