Xrispeters Posted December 4, 2019 Share Posted December 4, 2019 Hi, 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) Output 71798704 C:\Users\userID\Desktop\Savings Backlog.xlsx Chris Link to comment Share on other sites More sharing options...
Nine Posted December 4, 2019 Share Posted December 4, 2019 Can you show the code of GetFocusedItem () “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Xrispeters Posted December 4, 2019 Author Share Posted December 4, 2019 Thanks for getting back tio me so quickly. GetFocusedItem is from a library called AutomatingWindowsExplore.au3, I have attached the source code. AutomatingWindowsExplorer.au3 Link to comment Share on other sites More sharing options...
Xrispeters Posted December 4, 2019 Author Share Posted December 4, 2019 Hi, I did find another solutions that works, it's the GetFiles function from the same library 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