File Explorer Workarounds for Perspective?

Has anyone put together a simple workaround for browsing system files in perspective? My case is that I'd like my users to access reports that may or may not have been generated. i.e. generator 1 was not used that day, so no report was generated and placed in the folder.

I'd like to make a screen that gets these file paths, parses some info from the filepath, and displays it in a table so users can leverage the search feature for specific info.

I got the folder mounted via WebDev and can access my pdfs that are saved. It seems like you might be able to browse via a gateway system command like popen and rile it together based on that. I suppose you could also have some service on the server that you can hit an API on to return that information, too.

Why do you need a work-around? Jython or java file listing functions should Just Work™ in Perspective, perhaps to populate a Perspective table with links.

Believe it or not, I hadn't even considered that.
I've gotten used to (i.e. lazy) thinking that Ignition's system.x.y commands are the extent of system-level functions without some wonky workaround. Off a brief glimpse, I'll plunk into the lower level jython functions (I'm assuming you mean librarys like 'os'), which should hopefully work fine. I don't really need links, just the filenames within that mounted folder.

Thanks Phil for sensible and simple solutions.

import os
directory = r"C:\Users\LazyCoder\Reports"
files = os.listdir(directory)
print files

1 Like