I have a folder in my Google Drive that contains many images (+200000). I want to split these files into multiple smaller directories in my Google Drive, containing 30000 images each. Is there any way to do this with rclone?
I have the drive mounted in rclone. I have rclone version v1.51.0 on Windows 10.
Thank you for replying! Unfortunately all the files begin with the number 1, and are followed by random numbers. All files are named like this: '1212359897939005441 2020-02-11.jpg'. Can I somehow use the * for the end of the string before .jpg? Then I could do it by date. I tried this, but it doesn't do anything:
Maybe I used the term 'mount' incorrectly. What I mean is that I have my Gdrive set up as a remote in rclone. Sorry, I am a bit new to this, so I just wanted to clear that up.
Thanks for replying. I have updated rclone now to newest stable version.
I tried running this: rclone ls gdrivedu:hkimages --include *2019-02-*.jpg
And succesfully got all images from february 2019 listed in the cmd prompt.
I wish to copy all those images to the 'hkimagesfeb' directory on Gdrive, so I tried: rclone copy gdrivedu:hkimagesfeb gdrivedu:hkimages --include *2019-02-*.jpg
But it just returns:
2021/03/10 09:50:52 NOTICE:
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Elapsed time: 36m0.9s
2021/03/10 09:51:04 INFO : There was nothing to transfer
Sorry I am bad at communicating what I want to do. Thanks for helping. In the meantime, I have found a solution. In case anyone in the future stumbles upon this post:
I make a text file of all files in the directory that matches my pattern: rclone lsf gdrivedu:hkimages --include *2019-02-*.jpg > hkimagesfeb.txt
Then I create a directory, and copy all files listed in the txt file to that directory: rclone mkdir gdrivedu:hkimagesfeb rclone copy gdrivedu:hkimages gdrivedu:hkimagesfeb --files-from hkimagesfeb.txt -P -v
Oh cool, that is one step less I need to do. Thanks. I do the txt-file step because I want to be able to split it into smaller portions using Python, as some months have too many images for me to transfer them all to one folder. That way I can create sub-folders per month containing a smaller amount of images.