File Explorer on Mac Client

I am using the File Explorer component to select a location for a file to be saved and then appending the file name. When doing so i have to add “” to the front of the file name so it places it in the correct folder. This causes issues when the client is on a Mac. I am using the FileOutputStream from the Apache POI. Examples below.

Windows when saving to desktop = “sample.xls”
Mac when saving to desktop = “Desktop\sample.xls”

Also is there a way to tell what operating system the client is running on?

Any thoughts or suggestions are welcome.

Try these on the client, and see what values are returned for OSX vs Windows:

print system.util.getProperty(“os.arch”)
print system.util.getProperty(“os.name”)
print system.util.getProperty(“os.version”)

1 Like

Thanks PGriffith, i think that will help me out on knowing the file path structure.