# What is "working directory"?

## Recommended Posts

This might be a silly question but, AutoIt is my first language (Also the only one I know)

What is "working directory"? (2nd param in Run)

I saw the term many times, now I am curious about it.

Thanks in advance, TD

Edited by TheDcoder

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

##### Share on other sites

"Current/active working directory."

Means the Directory you are currently working in.

An example: If you are working with a script on your desktop, it would be C:UsersUserNameDesktop.

Edited by MikahS

Snips & Scripts

My Snips: graphCPUTemp ~ getENVvars
My Scripts: message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

##### Share on other sites

@MikahS If I supply a string (path) to Run(), how will it effect executable?

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

##### Share on other sites

The path (string) to the executable is the 1st parameter.

The working directory is what you have access to (the directory you are currently in). Not the path of the executable.

EDIT: I'm sure there are some who can explain a little more technical.

Edited by MikahS

Snips & Scripts

My Snips: graphCPUTemp ~ getENVvars
My Scripts: message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

##### Share on other sites

TheDcoder,

An Internet search is usually a good place to start - and the opening paragraph there is a pretty good description.

M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

##### Share on other sites

@Melba23 I already checked that before posting this thread . What I tried after reading the wiki is

Compiled this (test.exe):

FileOpen(@ScriptDir & '\text.txt', 1) ; Make a file called text.txt

Used another script to execute test.exe:

Run("test.exe", @AppDataDir) ; Both script are located in the same directory (Desktop)

It didn't create a file called text.txt in %appdata% as mentioned in the wiki

So I asked the question here, TD

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

##### Share on other sites

TheDcoder,

And why would it create a file in @AppDataDir when you are coding the exe to open a file on a specific path ((@ScriptDir) which will override the @WorkingDir setting? Recode the exe to remove the specific path and it will work as @WorkingDir will be used as the default location in the absence of a path.

M23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

##### Share on other sites

Thanks Melba

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

## 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

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...