blitzer99 2 Posted July 8, 2004 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. Computers don't solve problems, they just rearrange them.New string TRIM() functions for AutoIt3 Share this post Link to post Share on other sites
CyberSlug 6 Posted July 8, 2004 (edited) 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 $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 July 8, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Share this post Link to post Share on other sites
blitzer99 2 Posted July 8, 2004 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. Computers don't solve problems, they just rearrange them.New string TRIM() functions for AutoIt3 Share this post Link to post Share on other sites