For those familiered with FreeFileSync, know that there is another feature called RealTimeSync(RTS), who simply doesnt work at least in my MacOS, so I start making my own "RealTimeSync" but seems like I am not able to control FreeFileSync launchs when a popup is launched, after the sleep time it continues popuping up and doesnt wait for a click on this first popup. I have also tried to use my own warnings instead of FreeFileSync(FFS) popups but I cannot rely on that.
For default those batchs from FFS and RTS, I can only launch those directly with 'open' command, since both have extended attributes.
So do you have a way to show it one at a time?
This is the code that I am using right now, for testing:
For default those batchs from FFS and RTS, I can only launch those directly with 'open' command, since both have extended attributes.
So do you have a way to show it one at a time?

This is the code that I am using right now, for testing:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
import os import sys import subprocess import time ####EDIT HERE#### ffs_batch_folder_path = '/Users/admin/Desktop/AOI-A/RTS_Config/' ffs_batch_file = 'BatchRun_aoi2.ffs_batch' nas_folder_path = 'Download' ################# sleep_period = 60 #in seconds first_launch_sleep_period = 30 #in seconds def run_ffs_batch(): #give some time to connect remote folder where it will sync time.sleep(first_launch_sleep_period) #starts periodic function while ( 1 ): print ( '%s' % output) if os.path.exists( '/Volumes/%s' % nas_folder_path): if os.path.exists( '%s' % ffs_batch_folder_path): if len (output)> 400 : print ( 'Connected from remote folder' ) try : #run batch file subprocess.check_output([ 'open' , "%s" % ffs_batch_file], cwd = ffs_batch_folder_path) except subprocess.CalledProcessError as e: print ( 'Unable to sync, check batch file name and location: \n%s' % e) else : break ap = """ display dialog "Remote folder not accessible, please contact your system administrator!" with title "Warning from Remote Folder!" with icon caution buttons {"OK"} """ subprocess.call( "osascript -e '{}'" . format (ap),shell = True ) print ( 'Remote folder not accessible!' ) else : ap = """ display dialog "Localhost folder not accessible, please contact your system administrator!" with title "Warning from Localhost Folder!" with icon caution buttons {"OK"} """ subprocess.call( "osascript -e '{}'" . format (ap),shell = True ) print ( 'Localhost folder not accessible!' ) else : ap = """ display dialog "Remote folder not mounted, please contact your system administrator!" with title "Warning from Remote Folder!" with icon caution buttons {"OK"} """ subprocess.call( "osascript -e '{}'" . format (ap),shell = True ) print ( 'Remote folder not mounted!' ) #sync period of time time.sleep(sleep_period) if __name__ = = "__main__" : run_ffs_batch() |