You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The shared folder is the folder that the user shares with the web application via the Client File System API. This is the folder that the user chooses from the dialog when you call this code:
I've created an example directory that looks like this:
Example Folder
-folder1
----file1.txt
----file2.txt
-folder2
-textfile.txt
To get the relative path, you can use the "Name" property for each of the files and folders, then put it all together. For example here's how to get the relative path to file1.txt from the root folder (Example Folder):
//get all subdirectories, in this case folder1 and folder2
Directory[] subDirectoryArray = await directory.GetDirectoriesAsync("*");
//get folder1-it's the first one in the array
Directory folder1 = subDirectoryArray[0];
//get file1.txt from folder1
File[] fileArray = await folder1.GetFilesAsync("file1.txt");
//get the first (and only) file from the array
File file = fileArray[0];
//Put together the filepath based on the Name property
AlertBox.Show("filepath: "+folder1.Name+"\\"+file.Name);
I've attached the sample project and the sample directory.
Download both, and when you run the sample project, after clicking the button, select the sample directory (Example Folder). Doesn't matter where you put it in your filesystem as the browser will only have access to the files within the sample directory.
Activity
itg-assistant commentedon Jun 16, 2026
Julie (ITG) answered 2025-06-20 14:32:42 UTC
Unfortunately, it's not possible due to browser security restrictions. You can only get the relative path within the shared folder.
Julie
itg-assistant commentedon Jun 16, 2026
Rusty Elston answered 2025-06-20 14:41:53 UTC
Thanks Julie,
I don't understand "within the shared folder", what is the shared folder...?
itg-assistant commentedon Jun 16, 2026
Julie (ITG) answered 2025-06-20 16:07:46 UTC
The shared folder is the folder that the user shares with the web application via the Client File System API. This is the folder that the user chooses from the dialog when you call this code:
I've created an example directory that looks like this:
Example Folder
-folder1
----file1.txt
----file2.txt
-folder2
-textfile.txt
To get the relative path, you can use the "Name" property for each of the files and folders, then put it all together. For example here's how to get the relative path to file1.txt from the root folder (Example Folder):
I've attached the sample project and the sample directory.
Download both, and when you run the sample project, after clicking the button, select the sample directory (Example Folder). Doesn't matter where you put it in your filesystem as the browser will only have access to the files within the sample directory.
See also:
https://docs.wisej.com/extensions/extensions/clientfilesystem
https://developer.mozilla.org/en-US/docs/Web/API/File_API