Jump to content

Cannot get the correct path to a file

Recommended Posts


I'm new to AUtoIt and I am trying to retrieve the path of a file I do get a result, but it is not correct:

result: C:\Users\userID\Desktop\Savings Backlog.xlsx

actual path: C:\Users\UserId\SE\TCO SPOC's - General\Savings Backlog.xlsx

I read in the help file that _WinAPI_ShellGetPathFromIDList always returns a path relative to the root of the namespace, but I have no idea what that implies or how I can get the path that I need.  I have used teh code below.

  $pFolder = GetFocusedItem()
  ConsoleWrite($pFolder & @CRLF)
  $sFolder = _WinAPI_ShellGetPathFromIDList ($pFolder)
  consoleWrite($sFolder & @CRLF)


C:\Users\userID\Desktop\Savings Backlog.xlsx




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

  • Recently Browsing   0 members

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