Skip to main content

Hello,

I have configured a SystemCaller to delete all files and sub-directories within a specified directory, without deleting the specified directory. Originally, the plan was to have this at the end of the workspace, but now, we want the directory to be emptied at the start of the workspace, before any of the readers are initiated. I know this can be done using a startup Python script, but I was wondering if there is a way to call a startup command line command (so I can use the code I already wrote). I thought about changing my first reader to a FeatureReader, then using a creator to initiate the SystemCaller, then have the SystemCaller initiate the FeatureReader... but I was wondering if there was a more direct way to do this?

Thanks!

Courtney

Creator -> SystemCaller -> FeatureReader sounds like a good alternative to the startup script, if that is what you want to avoid.


Alternatively, a Python method such as "call" from the subprocess module might help you to run the existing command line in the startup Python script.


Thank you for the responses! I ended up writing a Python Startup script:


Thank you for the responses! I ended up writing a Python Startup script:

Nice one, thanks for sharing.

Reply