There is no built in function for monitoring a directory. I would recommend a Gateway timer script that iterates through the desired directory and saves the results to the database so that the next iteration, it can compare and see what if any changes happened. I would probably use the
os jython library.
b = os.path.getsize("/path/isa_005.mp3")
b would give you the size in bytes. So you’ll probably want to write a function to convert from bytes to kilobytes or megabytes or however you want to view it.
You can also use
os to iterate through a directory with
os.walk and modify the logic
for (root,dirs,files) in os.walk('someDirectory', topdown=true):
You’ll have to craft the logic yourself but I think these two functions should get you pretty much there (along with any help functions you find yourself needing).
Last note - if you know when you expect file changes, ie when some button is pushed or some other part of your Ignition application is run, you might prefer a gateway message handler to check at that moment, and perhaps to keep a gateway timer script with a long interim that runs in case of any misses.
Edit: To get date modified of the files - use