Does anyone know how to obtain the name of the current folder in which an autoit script is being run? (both the fully qualified name and the name of the current level only: for example "c:\program files\abc corporation\myapp" in the case of the former and just "myapp" in the case of the latter).
I have looked up all the functions, macros and user add-ons but I cannot see how to obtain this information.
Current folder name?
Started by
blitzer99
, Jul 08 2004 02:24 AM
2 replies to this topic
#1
Posted 08 July 2004 - 02:24 AM
Computers don't solve problems, they just rearrange them.New string TRIM() functions for AutoIt3
#2
Posted 08 July 2004 - 02:41 AM
Hmm.... The macros to try would be
@ScriptDir
or
@WorkingDir
MsgBox(4096,"Example", "The script is running from folder " & @ScriptDir)
Edit: For just the current folder level, you could try http://www.autoitscript.com/fileman/users/Valik/path.au3 or maybe
OR if using the latest unstable version of Autoit
@ScriptDir
or
@WorkingDir
MsgBox(4096,"Example", "The script is running from folder " & @ScriptDir)
Edit: For just the current folder level, you could try http://www.autoitscript.com/fileman/users/Valik/path.au3 or maybe
$p = StringSplit(@ScriptDir,"\") MsgBox(4096,"folder", $p[$p[0]] )
OR if using the latest unstable version of Autoit
$q = StringTrimLeft(@ScriptDir, StringInStr(@ScriptDir, "\", 0, -1)) MsgBox(4096,"folder", $q)
Edited by CyberSlug, 08 July 2004 - 02:49 AM.
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
#3
Posted 08 July 2004 - 02:52 AM
Great! Many thanks. Exactly what I was looking for.
I was looking in the AutoIt3 documentation under "Macro Reference / Directory Macros" where neither of these macros is shown.
I have now found them under AutoIt related macros.
I was looking in the AutoIt3 documentation under "Macro Reference / Directory Macros" where neither of these macros is shown.
Computers don't solve problems, they just rearrange them.New string TRIM() functions for AutoIt3
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users




