I’m getting data from Python via a file. Shellpaths work nicely on Mac OS and Linux. But Windows is confusing me. I get for instance a path like “C:\Users\BEATRI~1\AppData\Local\Temp\tmpvy9a5l57” from Windows (8.1).
In Xojo 2014r2.1 I have
dim MailFolderitem as FolderItem = GetFolderItem(theResult, FolderItem.PathTypeShell)
but the resulting folderitem doesn’t exist. I’ve verified in Windows Explorer that the file does exist. What am I missing here?
[quote=133744:@Beatrix Willius]I’m getting data from Python via a file. Shellpaths work nicely on Mac OS and Linux. But Windows is confusing me. I get for instance a path like “C:\Users\BEATRI~1\AppData\Local\Temp\tmpvy9a5l57” from Windows (8.1).
In Xojo 2014r2.1 I have
dim MailFolderitem as FolderItem = GetFolderItem(theResult, FolderItem.PathTypeShell)
but the resulting folderitem doesn’t exist. I’ve verified in Windows Explorer that the file does exist. What am I missing here?[/quote]
In Windows, you got in fact two kinds of shellpath : the Windows one, also called longpath, that is what you would type in the Command line or see on icons and in the window URL, and the path used internally by the system, which dates back to DOS, which did not support folder and file names longer than 8 characters. What you get is the Dos path, which for all intents and purposes, is the closest equivalent to the Mac escaped path, since it never contains spaces.
Actually in Windows Absolute, Native and Shell are the same thing.
I just tried to create a file in temp inside a folder with a space in it, so I get the dos path, then do a GetFolderItem with the string, and it works with all three types. Xojo finds the file to exist in all cases.
Something else may be going on. Maybe the file reported by Python is not finished creating when you verify it exists ?