I need to get CSV files from a Google Drive folder into the Ignition Designer Launcher. Whenever a user updates the CSV files in the Google Drive folder, those files should automatically be transferred to Designer. I need a solution for this automatic transfer. Once the CSV files arrive, I will process them inside Designer.
Install the google drive desktop app. Create a mapped drive to that path in Igntiion.
Use a gateway timed script to periodically check that path and do what processing you require, here is a starter:
import os, shutil
dbase = "MySQLss"
path = "google drive mapped drive path"
listx = os.listdir(path)
number_files = len(listx)
print number_files
for x in range(0, number_files):
file1 = os.listdir(path)[x]
#do something with the file
In my case I check for only new files, by inserting the filename to a DB when processed, then checking against that record the next time I scan.
3 Likes