Hello! from the last version of rclone, i have a little problem.
I need to erase (purge/rmdirs/delete) a list of folder es:
/folder1/subfolder1/
/folder2/
/folderx/subfolderx/subsubfolder/
I have create a list (similar to sync command or delete or copy) in include-from and in files-from mode. I have try to add some wildcards (ex: /folder1/subfolder1/**) or add some variations (folder/subfolder) etc. I have try various command (purge/rmdirs/delete), and preserve root ( --leave-root) flags... but I have the same problem...
if subfolder1 is empty and folder1 is empty too, the command erase the two folder, not only that i give in the list (/folder1/subfolder1/)
Is a little bug? there are some solution?
thanks...
Giancarlo.
It's best to use the template as that collects all the information rather than just deleting the big template that asks you to stop and please read it.
./newclone delete --rmdirs --include-from "filetobeerased.txt" -vv .
2021/02/09 11:44:36 DEBUG : rclone: Version "v1.55.0-beta.5165.14f9121a4.fix-rmdirs-filter" starting with parameters ["./thisclone" "delete" "--rmdirs" "--include-from" "filetobeerased.txt" "-vv" "."]
2021/02/09 11:44:36 DEBUG : Creating backend with remote "."
2021/02/09 11:44:36 DEBUG : Using config file from "/home/aldo/.config/rclone/rclone.conf"
2021/02/09 11:44:36 DEBUG : fs cache: renaming cache item "." to be canonical "/home/aldo/Scrivania/prova"
2021/02/09 11:44:36 DEBUG : Waiting for deletions to finish
2021/02/09 11:44:36 DEBUG : filetobeerased.txt: Excluded
2021/02/09 11:44:36 DEBUG : folder-3: Excluded
2021/02/09 11:44:36 DEBUG : folder-2/file_inutile.txt: Excluded
2021/02/09 11:44:36 DEBUG : fs cache: switching user supplied name "." for canonical name "/home/aldo/Scrivania/prova"
2021/02/09 11:44:36 DEBUG : filetobeerased.txt: Excluded
2021/02/09 11:44:36 DEBUG : folder-3: Excluded
2021/02/09 11:44:36 DEBUG : folder-2/file_inutile.txt: Excluded
2021/02/09 11:44:36 DEBUG : folder-2/sub-folder_2: Removing directory
2021/02/09 11:44:36 DEBUG : folder-2: Removing directory
2021/02/09 11:44:36 ERROR : folder-2: Failed to rmdir: remove /home/aldo/Scrivania/prova/folder-2: directory not empty
2021/02/09 11:44:36 ERROR : Attempt 1/3 failed with 1 errors and: remove /home/aldo/Scrivania/prova/folder-2: directory not empty
2021/02/09 11:44:36 DEBUG : Waiting for deletions to finish
2021/02/09 11:44:36 DEBUG : filetobeerased.txt: Excluded
2021/02/09 11:44:36 DEBUG : folder-3: Excluded
2021/02/09 11:44:36 DEBUG : folder-2/file_inutile.txt: Excluded
2021/02/09 11:44:36 DEBUG : fs cache: switching user supplied name "." for canonical name "/home/aldo/Scrivania/prova"
2021/02/09 11:44:36 DEBUG : thisclone: Excluded
2021/02/09 11:44:36 DEBUG : filetobeerased.txt: Excluded
2021/02/09 11:44:36 DEBUG : folder-3: Excluded
2021/02/09 11:44:36 DEBUG : folder-2/file_inutile.txt: Excluded
2021/02/09 11:44:36 DEBUG : folder-2: Removing directory
2021/02/09 11:44:36 ERROR : folder-2: Failed to rmdir: remove /home/aldo/Scrivania/prova/folder-2: directory not empty
2021/02/09 11:44:36 ERROR : Attempt 2/3 failed with 1 errors and: remove /home/aldo/Scrivania/prova/folder-2: directory not empty
2021/02/09 11:44:36 DEBUG : Waiting for deletions to finish
2021/02/09 11:44:36 DEBUG : thisclone: Excluded
2021/02/09 11:44:36 DEBUG : filetobeerased.txt: Excluded
2021/02/09 11:44:36 DEBUG : folder-3: Excluded
2021/02/09 11:44:36 DEBUG : folder-2/file_inutile.txt: Excluded
2021/02/09 11:44:36 DEBUG : fs cache: switching user supplied name "." for canonical name "/home/aldo/Scrivania/prova"
2021/02/09 11:44:36 DEBUG : filetobeerased.txt: Excluded
2021/02/09 11:44:36 DEBUG : folder-3: Excluded
2021/02/09 11:44:36 DEBUG : folder-2/file_inutile.txt: Excluded
2021/02/09 11:44:36 DEBUG : folder-2: Removing directory
2021/02/09 11:44:36 ERROR : folder-2: Failed to rmdir: remove /home/aldo/Scrivania/prova/folder-2: directory not empty
2021/02/09 11:44:36 ERROR : Attempt 3/3 failed with 1 errors and: remove /home/aldo/Scrivania/prova/folder-2: directory not empty
2021/02/09 11:44:36 DEBUG : 2 go routines active
2021/02/09 11:44:36 Failed to delete: remove /home/aldo/Scrivania/prova/folder-2: directory not empty
new tree
├── filetobeerased.txt
├── folder-1
│ └── subfolder_1
│ -------└── sub-sub-folder_1
├── folder-2
│ └── file_inutile.txt
├── folder-3
rclone now correctly delete /folder-2/sub-folder_2/ but not remove /folder-1/subfolder_1/sub-sub-folder_1/ and /folder-1/subfolder_1/
in the report i see they try tree times to delete /folder-2 and this is not in the filetobeerased.txt