Jump to content

Relative folders and fileGetLongName()


Recommended Posts

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

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?

:rolleyes:

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

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

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...