Error reading source root directory: directory not found

What is the problem you are having with rclone?

I'm trying to move file from local to remote but rclone always throws error of " directory not found"

Run the command 'rclone version' and share the full output of the command.

rclone v1.66.0
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 6.1.58+ (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.22.1
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

I'm currently using Onedrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone moveto './AudioBooks/326208637-A Taste for Monsters-Matthew J_forbiddenChar_ Kirby-Anna Mountford.mp3' 'onedrive:/AudioBooks' --metadata -vv --retries 1

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[onedrive]
type = onedrive
token = XXX
drive_id = XXX
drive_type = business

A log from the command that you were trying to run with the -vv flag

2024/03/14 12:24:52 DEBUG : rclone: Version "v1.66.0" starting with parameters ["rclone" "moveto" "./AudioBooks/326208637-A Taste for Monsters-Matthew J_forbiddenChar_ Kirby-Anna Mountford.mp3" "onedrive:/AudioBooks" "--metadata" "-vv" "--retries" "1"]
2024/03/14 12:24:52 DEBUG : Creating backend with remote "./AudioBooks/326208637-A Taste for Monsters-Matthew J_forbiddenChar_ Kirby-Anna Mountford.mp3"
2024/03/14 12:24:52 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2024/03/14 12:24:52 DEBUG : fs cache: renaming cache item "./AudioBooks/326208637-A Taste for Monsters-Matthew J_forbiddenChar_ Kirby-Anna Mountford.mp3" to be canonical "/content/AudioBooks/326208637-A Taste for Monsters-Matthew J_forbiddenChar_ Kirby-Anna Mountford.mp3"
2024/03/14 12:24:52 DEBUG : Creating backend with remote "onedrive:/AudioBooks"
2024/03/14 12:24:52 DEBUG : fs cache: renaming cache item "onedrive:/AudioBooks" to be canonical "onedrive:AudioBooks"
2024/03/14 12:24:52 ERROR : Local file system at /content/AudioBooks/326208637-A Taste for Monsters-Matthew J_forbiddenChar_ Kirby-Anna Mountford.mp3: error reading source root directory: directory not found
2024/03/14 12:24:52 DEBUG : OneDrive root 'AudioBooks': Waiting for checks to finish
2024/03/14 12:24:52 DEBUG : OneDrive root 'AudioBooks': Waiting for transfers to finish
2024/03/14 12:24:52 ERROR : Attempt 1/1 failed with 1 errors and: directory not found
2024/03/14 12:24:52 INFO  : 
Transferred:   	          0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         0.8s

2024/03/14 12:24:52 DEBUG : 7 go routines active
2024/03/14 12:24:52 Failed to moveto: directory not found

welcome to the forum,

Local file system at /content/AudioBooks/326208637-A Taste for Monsters-Matthew J_forbiddenChar_ Kirby-Anna Mountford.mp3: error reading source root directory: directory not found

rclone cannot find the source dir, does it exist?
what is the ouput of rclone lsd /content

and good idea to create your own client id/secret, as per rclone docs.

it should be, here is the return when I run

!rclone ls /content/AudioBooks -vv
2024/03/14 12:56:14 DEBUG : rclone: Version "v1.66.0" starting with parameters ["rclone" "ls" "/content/AudioBooks" "-vv"]
2024/03/14 12:56:14 DEBUG : Creating backend with remote "/content/AudioBooks"
2024/03/14 12:56:14 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
292029472 326208637-A Taste for Monsters-Matthew J. Kirby-Anna Mountford.mp3
2024/03/14 12:56:14 DEBUG : 4 go routines active

might try move, not moveto?

it's not working either

rclone move './AudioBooks/326208637-A Taste for Monsters-Matthew J_forbiddenChar_ Kirby-Anna Mountford.mp3' 'onedrive:AudioBooks' --local-encoding "Slash,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot" --retries 1
2024/03/14 12:58:54 ERROR : Local file system at /content/AudioBooks/326208637-A Taste for Monsters-Matthew J_forbiddenChar_ Kirby-Anna Mountford.mp3: error reading source root directory: directory not found
2024/03/14 12:58:54 ERROR : Attempt 1/1 failed with 1 errors and: directory not found
2024/03/14 12:58:54 Failed to move: directory not found

what is that?
and now you changed the command, adding --local-encoding

It's just in the file name

try copying another file, something simple, file.ext

I came across a post and it was the solution, I was giving it a try.
Even with out --local-encoding it's return is still the same

rclone move './AudioBooks/326208637-A Taste for Monsters-Matthew J_forbiddenChar_ Kirby-Anna Mountford.mp3' 'onedrive:AudioBooks' --retries 1
2024/03/14 13:05:11 ERROR : Local file system at /content/AudioBooks/326208637-A Taste for Monsters-Matthew J_forbiddenChar_ Kirby-Anna Mountford.mp3: error reading source root directory: directory not found
2024/03/14 13:05:11 ERROR : Attempt 1/1 failed with 1 errors and: directory not found
2024/03/14 13:05:11 Failed to move: directory not found

might try that and use full paths, not relative.

it works though :slight_smile:

I notice that when you did the ls it came back without the forbiddenChar:

So it does seem like that could be part of why rclone isn't finding it.

Also, with moveto if the source is a file rather than a directory, then the dest should also specify a filename. I would try this:

rclone moveto './AudioBooks/326208637-A Taste for Monsters-Matthew J. Kirby-Anna Mountford.mp3' 'onedrive:/AudioBooks/326208637-A Taste for Monsters-Matthew J. Kirby-Anna Mountford.mp3' --metadata -vv --retries 1
1 Like

could be an issue with the filename of that other file.

given that you are not renaming the source file, i would test with rclone move, not rclone moveto

1 Like

It was the file name that caused that, after removing all "." it works perfectly

Thanks a lot for your support, I finally found that it was the little "." in the file name that caused the issue.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.