sshrum Posted June 14, 2007 Share Posted June 14, 2007 I can't get fileGetLongName() to convert a path like: '..\..\foobar' If I pass just 'foobar', it's resolving to my script folder + "\foobar" (cuz I have a folder there with that name) I want this to return back the foobar folder that is 2 levels up but it constantly returns '..\..\foobar'. According the the help file, passing a 1 with this function enables relative support but at the same time it indicates that you need to pass a full path. Hmmm. Any ideas. Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
Rick Posted June 14, 2007 Share Posted June 14, 2007 StringTrimRight(@ScriptDir,x) where x is so many characters to go back ?? Who needs puzzles when we have AutoIt!! Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 15, 2007 Share Posted June 15, 2007 This works fine for me: $str = FileGetLongName("..\..\java", 1) ConsoleWrite("$str = " & $str & @LF) Returns: $str = C:\Program Files\Java Did you forget the "relative path" flag? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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