rmdirs is attempting to delete not empty directory with *.gform files and I do not expect it to do this as the directory/folder is not empty as I see it.
Run the command 'rclone version' and share the full output of the command.
rclone v1.75.1
- os/version: Microsoft Windows 11 Pro 25H2 25H2 (64 bit)
- os/kernel: 10.0.26200.9445 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.26.8
- go/linking: static
- go/tags: cmount
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)
well i am actually trying to run it for real.. but discovered it was not finding files ending in *.gform and so wants to delete these directories!?
The rclone config contents with secrets removed.
[gdrv]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = XXX
team_drive =
[synth]
type = local
A log from the command with the -vv flag
PS C:\WINDOWS\system32> C:\code\rclone\rclone rmdirs gdrv:"_REDACTED/form" --dry-run -vv
2026/09/10 16:32:09 DEBUG : rclone: Version "v1.75.1" starting with parameters ["C:\\code\\rclone\\rclone.exe" "rmdirs" "gdrv:_REDACTED/form" "--dry-run" "-vv"]
2026/09/10 16:32:09 DEBUG : Creating backend with remote "gdrv:_REDACTED/form"
2026/09/10 16:32:09 DEBUG : Using config file from "C:\\Users\\REDACTED_USER\\AppData\\Roaming\\rclone\\rclone.conf"
2026/09/10 16:32:09 DEBUG : Google drive root '_REDACTED/form': 'root_folder_id = 0AG_REDACTED_PVA' - save this in the config to speed up startup
2026/09/10 16:32:10 DEBUG : REDACTED_file: No export formats found for "application/vnd.google-apps.form"
2026/09/10 16:32:10 DEBUG : REDACTED_file2: No export formats found for "application/vnd.google-apps.form"
2026/09/10 16:32:10 DEBUG : removing 1 level 0 directories
2026/09/10 16:32:10 NOTICE: Google drive root '_REDACTED/form': Skipped remove directory as --dry-run is set
2026/09/10 16:32:10 DEBUG : 3 go routines active
so it seems to recognize that there are files in the folder but says ``` no export formats found..```
I have also tried to run this with
--drive-skip-gdocs=false or --drive-skip-gdocs=true
gives the same output BUT for example when i create a gdoc file such as *.gsheet then it does not any longer want to remove the folder, basically the lines debug:removing 1... AND notice: google... are not provided.
ok I duplicated a form in forms.google.com into the temp directory (i was unable to drag/drop them).
output was as follows for the commands given on the directory (i ran with -vv as otherwise there was no output ):
PS C:\WINDOWS\system32> C:\code\rclone\rclone lsd gdrv:temp
PS C:\WINDOWS\system32> C:\code\rclone\rclone lsd gdrv:temp -vv
2026/09/10 18:38:22 DEBUG : rclone: Version "v1.75.1" starting with parameters ["C:\\code\\rclone\\rclone.exe" "lsd" "gdrv:temp" "-vv"]
2026/09/10 18:38:22 DEBUG : Creating backend with remote "gdrv:temp"
2026/09/10 18:38:22 DEBUG : Using config file from "C:\\Users\\REDACTED_USER\\AppData\\Roaming\\rclone\\rclone.conf"
2026/09/10 18:38:22 DEBUG : Google drive root 'temp': 'root_folder_id = 0AG_REDACTED_PVA' - save this in the config to speed up startup
2026/09/10 18:38:23 DEBUG : rclone_rmdirs_test_form: No export formats found for "application/vnd.google-apps.form"
2026/09/10 18:38:23 DEBUG : 3 go routines active
PS C:\WINDOWS\system32> C:\code\rclone\rclone ls gdrv:temp
PS C:\WINDOWS\system32> C:\code\rclone\rclone ls gdrv:temp -vv
2026/09/10 18:39:40 DEBUG : rclone: Version "v1.75.1" starting with parameters ["C:\\code\\rclone\\rclone.exe" "ls" "gdrv:temp" "-vv"]
2026/09/10 18:39:40 DEBUG : Creating backend with remote "gdrv:temp"
2026/09/10 18:39:40 DEBUG : Using config file from "C:\\Users\\REDACTED_USER\\AppData\\Roaming\\rclone\\rclone.conf"
2026/09/10 18:39:40 DEBUG : Google drive root 'temp': 'root_folder_id = 0AG_REDACTED_PVA' - save this in the config to speed up startup
2026/09/10 18:39:41 DEBUG : rclone_rmdirs_test_form: No export formats found for "application/vnd.google-apps.form"
2026/09/10 18:39:41 DEBUG : 3 go routines active
as an extra check, i reran the rmdirs with the same result as before, it wants to delete the directory
PS C:\WINDOWS\system32> C:\code\rclone\rclone rmdirs gdrv:temp --dry-run -vv
2026/09/10 18:44:20 DEBUG : rclone: Version "v1.75.1" starting with parameters ["C:\\code\\rclone\\rclone.exe" "rmdirs" "gdrv:temp" "--dry-run" "-vv"]
2026/09/10 18:44:20 DEBUG : Creating backend with remote "gdrv:temp"
2026/09/10 18:44:20 DEBUG : Using config file from "C:\\Users\\REDACTED_USER\\AppData\\Roaming\\rclone\\rclone.conf"
2026/09/10 18:44:21 DEBUG : Google drive root 'temp': 'root_folder_id = 0AG_REDACTED_PVA' - save this in the config to speed up startup
2026/09/10 18:44:22 DEBUG : rclone_rmdirs_test_form: No export formats found for "application/vnd.google-apps.form"
2026/09/10 18:44:22 DEBUG : removing 1 level 0 directories
2026/09/10 18:44:22 NOTICE: Google drive root 'temp': Skipped remove directory as --dry-run is set
2026/09/10 18:44:22 DEBUG : 3 go routines active
PS C:\WINDOWS\system32>
good find! thanks! doing a quick test this did seem to do it.. but I am feeling now I need to analyse the full logs some more to confirm it works everywhere which will take some time.. i honestly felt lucky to spot this directory and made me wonder what else I or others may have deleted by mistake.
but then,
@ncw - interesting idea, I honestly figured--dry-run was at the end of the checks which would then run delete on the directory regardless ...... but it DID error!?
to do this i created another directory in temp and added another form to it and this is the journey .. under --dry-run it registered it to be deleted.. but rclone again DID in fact error when running live!? mind you I am glad I have likely not deleted something that I missed previously but somewhere something is buggy I think.
PS C:\WINDOWS\system32> C:\code\rclone\rclone rmdirs gdrv:temp\temp2 --drive-show-all-gdocs --dry-run -vv
2026/09/11 08:40:49 DEBUG : rclone: Version "v1.75.1" starting with parameters ["C:\\code\\rclone\\rclone.exe" "rmdirs" "gdrv:temp\\temp2" "--drive-show-all-gdocs" "--dry-run" "-vv"]
2026/09/11 08:40:49 DEBUG : Creating backend with remote "gdrv:temp\\temp2"
2026/09/11 08:40:49 DEBUG : Using config file from "C:\\Users\\REDACTED_USER\\AppData\\Roaming\\rclone\\rclone.conf"
2026/09/11 08:40:49 DEBUG : gdrv: detected overridden config - adding "{gCMI1}" suffix to name
2026/09/11 08:40:49 DEBUG : Google drive root 'temp/temp2': 'root_folder_id = 0AG_REDACTED_PVA' - save this in the config to speed up startup
2026/09/11 08:40:49 DEBUG : fs cache: renaming cache item "gdrv:temp\\temp2" to be canonical "gdrv{gCMI1}:temp/temp2"
2026/09/11 08:40:50 DEBUG : 3 go routines active
PS C:\WINDOWS\system32> C:\code\rclone\rclone rmdirs gdrv:temp\temp2 --dry-run -vv
2026/09/11 08:41:04 DEBUG : rclone: Version "v1.75.1" starting with parameters ["C:\\code\\rclone\\rclone.exe" "rmdirs" "gdrv:temp\\temp2" "--dry-run" "-vv"]
2026/09/11 08:41:04 DEBUG : Creating backend with remote "gdrv:temp\\temp2"
2026/09/11 08:41:04 DEBUG : Using config file from "C:\\Users\\REDACTED_USER\\AppData\\Roaming\\rclone\\rclone.conf"
2026/09/11 08:41:04 DEBUG : Google drive root 'temp/temp2': 'root_folder_id = 0AG_REDACTED_PVA' - save this in the config to speed up startup
2026/09/11 08:41:05 DEBUG : fs cache: renaming cache item "gdrv:temp\\temp2" to be canonical "gdrv:temp/temp2"
2026/09/11 08:41:05 DEBUG : rclone rmdirs form to test 2: No export formats found for "application/vnd.google-apps.form"
2026/09/11 08:41:05 DEBUG : removing 1 level 0 directories
2026/09/11 08:41:05 NOTICE: Google drive root 'temp/temp2': Skipped remove directory as --dry-run is set
2026/09/11 08:41:05 DEBUG : 3 go routines active
PS C:\WINDOWS\system32> C:\code\rclone\rclone rmdirs gdrv:temp\temp2 -vv
2026/09/11 08:42:03 DEBUG : rclone: Version "v1.75.1" starting with parameters ["C:\\code\\rclone\\rclone.exe" "rmdirs" "gdrv:temp\\temp2" "-vv"]
2026/09/11 08:42:03 DEBUG : Creating backend with remote "gdrv:temp\\temp2"
2026/09/11 08:42:03 DEBUG : Using config file from "C:\\Users\\REDACTED_USER\\AppData\\Roaming\\rclone\\rclone.conf"
2026/09/11 08:42:03 DEBUG : Google drive root 'temp/temp2': 'root_folder_id = 0AG_REDACTED_PVA' - save this in the config to speed up startup
2026/09/11 08:42:03 DEBUG : fs cache: renaming cache item "gdrv:temp\\temp2" to be canonical "gdrv:temp/temp2"
2026/09/11 08:42:04 DEBUG : rclone rmdirs form to test 2: No export formats found for "application/vnd.google-apps.form"
2026/09/11 08:42:04 DEBUG : removing 1 level 0 directories
2026/09/11 08:42:04 INFO : Google drive root 'temp/temp2': Removing directory
2026/09/11 08:42:04 DEBUG : Rmdir: contains file: "rclone rmdirs form to test 2"
2026/09/11 08:42:04 ERROR : Failed to rmdir: directory not empty
2026/09/11 08:42:04 ERROR : Attempt 1/3 failed with 2 errors and: failed to remove directories: directory not empty
2026/09/11 08:42:05 DEBUG : rclone rmdirs form to test 2: No export formats found for "application/vnd.google-apps.form"
2026/09/11 08:42:05 DEBUG : removing 1 level 0 directories
2026/09/11 08:42:05 INFO : Google drive root 'temp/temp2': Removing directory
2026/09/11 08:42:05 DEBUG : Rmdir: contains file: "rclone rmdirs form to test 2"
2026/09/11 08:42:05 ERROR : Failed to rmdir: directory not empty
2026/09/11 08:42:05 ERROR : Attempt 2/3 failed with 2 errors and: failed to remove directories: directory not empty
2026/09/11 08:42:05 DEBUG : rclone rmdirs form to test 2: No export formats found for "application/vnd.google-apps.form"
2026/09/11 08:42:05 DEBUG : removing 1 level 0 directories
2026/09/11 08:42:05 INFO : Google drive root 'temp/temp2': Removing directory
2026/09/11 08:42:05 DEBUG : Rmdir: contains file: "rclone rmdirs form to test 2"
2026/09/11 08:42:05 ERROR : Failed to rmdir: directory not empty
2026/09/11 08:42:05 ERROR : Attempt 3/3 failed with 2 errors and: failed to remove directories: directory not empty
2026/09/11 08:42:05 DEBUG : 3 go routines active
2026/09/11 08:42:05 NOTICE: Failed to rmdirs with 2 errors: last error was: failed to remove directories: directory not empty
PS C:\WINDOWS\system32> C:\code\rclone\rclone rmdirs gdrv:temp\temp2 --dry-run
2026/09/11 08:45:30 NOTICE: Google drive root 'temp/temp2': Skipped remove directory as --dry-run is set
PS C:\WINDOWS\system32> C:\code\rclone\rclone rmdirs gdrv:temp\temp2 --drive-show-all-gdocs
PS C:\WINDOWS\system32> C:\code\rclone\rclone rmdirs gdrv:temp\temp2 --drive-show-all-gdocs -vv
2026/09/11 08:52:10 DEBUG : rclone: Version "v1.75.1" starting with parameters ["C:\\code\\rclone\\rclone.exe" "rmdirs" "gdrv:temp\\temp2" "--drive-show-all-gdocs" "-vv"]
2026/09/11 08:52:10 DEBUG : Creating backend with remote "gdrv:temp\\temp2"
2026/09/11 08:52:10 DEBUG : Using config file from "C:\\Users\\REDACTED_USER\\AppData\\Roaming\\rclone\\rclone.conf"
2026/09/11 08:52:10 DEBUG : gdrv: detected overridden config - adding "{gCMI1}" suffix to name
2026/09/11 08:52:10 DEBUG : Google drive root 'temp/temp2': 'root_folder_id = 0AG_REDACTED_PVA' - save this in the config to speed up startup
2026/09/11 08:52:11 DEBUG : fs cache: renaming cache item "gdrv:temp\\temp2" to be canonical "gdrv{gCMI1}:temp/temp2"
2026/09/11 08:52:11 DEBUG : 3 go routines active
interestingly it does not error and works fine with the switch from @asdffdsa--drive-show-all-gdocs .. my guess is that this should be standard in rmdirs in relation to a gdrive so that rmdirs in --dry-run can avoid worrying and wrong dry run output.. while it seems rmdirs only checks for exportable gdrive natives (?)
That is what should happen. The reason is that users can set filters which can hide directory entries so rmdirs thinks the directory is empty but gets an error when it tries to delete it. Rmdirs is designed to remove as many directories as it can so this works out just fine, except for the error message.
This is very similar to what is happening with the gforms - they don't appear in directories normally (because rclone can't copy them) so they are effectively filtered out. On some storage systems there can be invisible old versions in a directory too which have the same effect.
Using -drive-show-all-gdocs is a great idea though! This is useful if you are doing a server side copy and do want to copy the gforms (rclone can do that, it just can't download or upload gforms) and apparently useful for rclone rmdirs too
I am glad it errored, it just seems it should not get to that line of defense - I mean, what is the purpose of a dry run if it is not a dry run one can rely on?
should i submit a proper bug report on github or can/will someone take it from here? I am honestly not sure what should be "fixed" to avoid the command erroring and that the rmdirs against a google drive should do as it says not try in any way (in dry run or not) to delete a directory with files in it regardless of file types.
The dry run did exactly what it should. It showed that rclone would remove the directory, so I would not run the real command yet. The no export formats found lines suggest Google Forms are being seen but not counted as files for the emptiness check. Since --drive-skip-gdocs gives the same result, this looks like a Drive backend edge case. I would file it as a bug with the version, redacted command, config, and -vv output.