I use rclone to put data from a DB to a xlsx file in my google drive, named source.xlsx
then, I use other sheet file importing data from source.xlsx, using function like this, with uid file:
The problem is that, with rclone, copy/sync/or other i've tried delete the source.xlsx file in gdrive et put another file. Result, as the UID file is no longer the same, my function point to the source.xlsx that is in the trash! so not the updated...
I've noticed that, if the file is the same (md5 check i suppose), the file on gdrive is not removed/copy with UID change. Sometimes, the file is updated, keeping UID, if it's an update made the same day for exemple.
Is it possible to prevent UID change?
Thanks a lot for your help and... Happy new year!
Rclone used on Fedora Linux, rclone v1.51.0 (os/arch: linux/amd64, go version: go1.14rc1)
Cloud storage system: Google Drive
rclone sync source.xlsx "MyDrive":"MyFolder" --drive-import-formats xlsx
Rclone uploads a new version of the file when it updates it, but I think that will always create a new ID
Are there any other import references you can use?
Thx for your quick answer
Yes you must use uid in gdrive as soon as you import data from another file... It seems to be the only way to do it as you can share files to others without the same complete path.
So it's very problematic that rclone doesn't accept uid path to the file to update
Rclone uses the file import api in the drive v3 API and I don't think you can specify a file ID.
However you could use rclone to find the new ID of the file and update a single cell in your sheet with that?
You'd find the ID with something like
rclone lsf -F i drive:path/to/sheet.xlsx
I think a script to update a cell in a google sheet is relatively easy...
Hi, i've tried that. It could be a good way to to it, BUT:
with importrange, you have to approve the right to access to the other file... so as file ID change, I have to grant access manualy every time
If you can grant access to the directory the file lives in, then you can use its name. You'd then use the --drive-root-folder-id flag to point at that directory.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.