FolderItem.ShellPath

From Xojo Documentation

Read-Only Property (As String )
StringValue = aFolderItem.ShellPath

New in 5.5

Supported for all project types and targets.

Gets the shell path of the FolderItem.

Notes

On Windows, ShellPath returns the short path, if the item exists. Otherwise, ShellPath returns the long path as returned by NativePath. For discussion of short v. long paths, see [1].

On macOS and Linux, this is the POSIX path, but escaped.

Escaped means that special characters such as blanks are prefixed with an escape character. Therefore, you can use it to pass to the Shell object, but you can not directly pass it to OS functions that expect a POSIX path. To get a proper, unescaped, POSIX path on macOS or Linux, use FolderItem.NativePath.

Example

Var f As New FolderItem
f = FolderItem.ShowOpenFileDialog("????")

MessageBox(f.ShellPath)