Solved

Startup Command Line Command

  • 8 December 2016
  • 4 replies
  • 2 views

Badge

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

icon

Best answer by courtney_m 9 February 2017, 15:39

View original

4 replies

Userlevel 4

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

Userlevel 2
Badge +17

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.

Badge

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

Userlevel 4

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

Nice one, thanks for sharing.

Reply