blitzer99 Posted July 8, 2004 Share 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 Link to comment Share on other sites More sharing options...
CyberSlug Posted July 8, 2004 Share 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! Link to comment Share on other sites More sharing options...
blitzer99 Posted July 8, 2004 Author Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now