Hello! I wish to have a script command which would delete the Files/Folders inside the Google Drive Mounting Location for the rclone mount.
rclone mount command: rclone mount --allow-other --buffer-size 256M --dir-cache-time 96h --timeout 1h --default-permissions --uid 99 --gid 100 --umask 002 --vfs-cache-mode full --vfs-cache-max-age 24h -v --progress --cache-dir /mnt/disks/ua_hdd1/rclone/cache gdrive: /mnt/disks/ua_hdd1/gdrive &
Now, I wish to delete the files/folders inside /mnt/disks/ua_hdd1/gdrive before I run the rclone mount command.
I have a bash script which runs the rclone mount command each time I restart the server. So I am thinking to add that delete command in the same bash script before the rclone mount command.
But make sure it doesn't delete anything after rclone is mounted.
Reason: This --allow-non-empty doesn't work.
Error: 2021/03/01 20:31:27 Fatal error: Directory is not empty:
P.S.: I have not followed the Bug Format because it is not a bug rather a simple help request post.
Thanks.
DEFAULT HELP REQUEST FORMAT IS ADDED ON THE REQUEST OF @Animosity022
What is the problem you are having with rclone?
To be able to delete the files/folders inside the mount location before rclone mount command is run. But --allow-non-empty option doesn't work as expected.
What is your rclone version (output from rclone version)
1.54.0
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Unraid 6.8.3 (Lastest Stable)
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone mount --allow-other --buffer-size 256M --dir-cache-time 96h --timeout 1h --default-permissions --uid 99 --gid 100 --umask 002 --vfs-cache-mode full --vfs-cache-max-age 24h -v --progress --cache-dir /mnt/disks/ua_hdd1/rclone/cache gdrive: /mnt/disks/ua_hdd1/gdrive &
The rclone config contents with secrets removed.
[gdrive]
type = drive
client_id = xxxxxxx.apps.googleusercontent.com
client_secret = xxxxxx
scope = drive
token = {"access_token":"xxxxxxx"}
team_drive = xxxxxx
root_folder_id =
A log from the command with the -vv flag
2021/03/01 20:31:27 Fatal error: Directory is not empty: /mnt/disks/ua_hdd1/gdrive If you want to mount it anyway use: --allow-non-empty option
Script Starting Mar 01, 2021 20:38.01
Unraid Forum Comment on Waseh's rclone Thread: https://forums.unraid.net/topic/51633-plugin-rclone/?do=findComment&comment=953846