I am downloading a file from google drive and uploading it to another website.
I have applied forever while loop because as soon a file is modified it will download that file and upload to the website.
I have applied another condition that if in case the file is modified in last 10 minutes it will take that file only. But lets say if there are 3 files which were modified in the last 10 minutes, it keeps on downloading those files again and again and uploads on the website.
Can anyone help me with the logic that if a particular file of a particular time stamp has been downloaded from the drive, it does not download that file again.
Hi,
Here you can create a short data table, the information contains a data like file_name or anything to match with current data, so if the first loop is finished, in the second loop it will check in data table whether the file exist.
if file exist is true, skip to further to other process else download the file.
There are basically 70 CSV files in a folder in Drive. I have taken Gsuite in a forever while loop.
I check the modified time for each of those sheets. IWhile iterating for each sheet, If the sheet was modified in say last 10 mins. The bot downloads that sheet to the computer and then uploads that same sheet to the website where i want it uploaded. But it uploads the same file again and again since it is in an infinite while loop.
Yes, both var will be as string and make sure date format should be 19-02-2022 04:06:05 date/month/year hour: minutes:seconds for both variable and subtract them
Hi @Yogesh1 , this is taking the file again and again because it is in a forever while loop so for the second time it again takes it…I have thought of many ways but couldn’t find any…is there any other way?