How to refer to current directory?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
dandyling
Newbie
Posts: 3
Joined: Tue Jun 09, 2015 10:38 am

How to refer to current directory?

Post by dandyling » Wed Oct 28, 2015 9:42 am

How do I refer to the current directory from which compiled exe is running?

Basically, i have a mycfg.ini file in the same directory as which the macro is. I would like it to refer to it, for example ./mycfg.ini.

How do I do that in Macro Scheduler?

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Re: How to refer to current directory?

Post by armsys » Wed Oct 28, 2015 9:54 am

Not sure if %SCRIPT_DIR% meets your requirement.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: How to refer to current directory?

Post by Marcus Tettmar » Wed Oct 28, 2015 4:52 pm

As Armsys says - SCRIPT_DIR is what you need:

https://www.mjtnet.com/blog/2014/11/17/ ... explained/
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts