we want to update programfiles on local computer from a server, with the Robocopy /mir function. The Function to check running program was so it would not copy when the program is in use, since its and oracle database u can have many open instances. so something like:

Copy to local server -> when user start program it starts script then program -> the script check if program is running -> if running not do anything but start a new instance and that will result in an error from that. -> if not running then copy files from local server to local computer and start them from there at the end.