STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.
What is the problem you are having with rclone?
Can't move directory using rc command/movefile?
Run the command 'rclone version' and share the full output of the command.
rclone v1.65.2
- os/version: debian 11.8 (64 bit)
- os/kernel: 5.10.0-26-amd64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.6
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Google Drive (w/crypt)
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone rc -vv log-file=rclone.out operations/movefile srcFs=gcrypt: 'srcRemote=downloads/mybooks/Bearing An Hourglass - Recorded Books' dstFs=gcrypt: 'dstRemote=home/haynes/data/books/Bearing An Hourglass - Recorded Books'
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
[gcrypt]
type = crypt
remote = gdrive:crypt
filename_encryption = standard
password = XXX
password2 = XXX
directory_name_encryption = true
[gdrive]
type = drive
client_id = XXX
client_secret = XXX
token = XXX
root_folder_id = XXX
team_drive =
A log from the command that you were trying to run with the -vv
flag
2024/02/10 05:26:48 DEBUG : rclone: Version "v1.65.2" starting with parameters ["rclone" "rc" "-vv" "--log-file=rclone.out" "operations/movefile" "srcFs=gcrypt:" "srcRemote=downloads/mybooks/Bearing An Hourglass - Recorded Books" "dstFs=gcrypt:" "dstRemote=home/haynes/data/books/Bearing An Hourglass - Recorded Books"]
2024/02/10 05:26:49 DEBUG : 6 go routines active
2024/02/10 05:26:49 Failed to rc: operation "operations/movefile" failed: is a directory not a file
Output of remote command
{
"error": "is a directory not a file",
"input": {
"dstFs": "gcrypt:",
"dstRemote": "home/haynes/data/books/Bearing An Hourglass - Recorded Books",
"srcFs": "gcrypt:",
"srcRemote": "downloads/mybooks/Bearing An Hourglass - Recorded Books"
},
"path": "operations/movefile",
"status": 500
}
What I'm trying to do is reorganize my directory structure, and clean up. I'm trying to move the files and directories I want to keep from downloads/mybooks to home/haynes/data/books. There's tens of thousands of top level entries in downloads/mybooks, a mixture of files and directories. I want to move a few hundrets of them to home/haynes/data/books (as a bonus I'm trying to leave behind a shortcut to the new location but that's out of scope for this question.)
Now obviously from the name, "movefile
" seems like it wouldn't move directories, but I haven't found a rc equivalent to the "moveto
" command. I could use rclone moveto
with a file list, but rclone moveto —files-from-raw=filelist
seems to ignore directories and doing it in a loop seems inefficient and slow.
It seems like I must be missing something basic and obvious, but I can't figure out how to efficiently do a server side move of a bunch of subdirectories from one directory to another.