Sign in to follow this  
Followers 0
Rishav

Navigating folder paths [Beginner Level]

9 posts in this topic

#1 ·  Posted (edited)

Hi folks

more silly questions.

I have to write an #include command for an UDF.

something like;

#include "C:\Main\ABC\Script DIR\ XXX.au3"

Problem here is that my directory is something like;

Posted Image

As you can well see I suck at drawing and that my target folder is not inside the script directory.

Basically I need to write the Include command from the @ScriptDIR and call a procedure in the arget DIR folder.

I don't want to use the full windows path "C:\Main\ABC\Script DIR\ XXX.au3" as it will change on every machine I put m y code on. It has to be derived from the Script directory. Any help?

regards

Rishav.

Edited by Rishav

Share this post


Link to post
Share on other sites



Hey,

try it like this,

#include "..\ABC\TargetDir\inc.au3"

Share this post


Link to post
Share on other sites

thanks.

exactly what I was looking for.

But I am getting an error now when I use;

#include @ScriptDir & "..\resources\Functions\ChangeResolution.au3"

ERROR: illegal character in include directive

Share this post


Link to post
Share on other sites

#include "..\resources\Functions\ChangeResolution.au3"

Share this post


Link to post
Share on other sites

thanks.

So I guess it starts at Script dir by default?

Share this post


Link to post
Share on other sites

Yep.

Share this post


Link to post
Share on other sites

Sorry to pull up this old thread.

How do I go up two or more than two directories?

#include "..\..\Main.au3"

or

#include ".." & "..\Main.au3"

doesn't seems to work.

Share this post


Link to post
Share on other sites

Try:

#include "..\..\..\Main.au3"

Share this post


Link to post
Share on other sites

Hi foster., Thanks for the reply.

I don't think that will work. "..\..\" didn;t work so i doubt "..\..\..\" will work.

that said, I'll give it a try as soon as I reach home.

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  
Followers 0