Some file can't found by rclone and throw "directory not found"

What is the problem you are having with rclone?

I'm trying to copy the downloaded file to both local path and OneDrive. But I meet the problem that some file can't be found by rclone. Even it realy does exist.

This probably a bug? Using rclone copy for some file can work, but some other file goes wrong. The error says that the "source root directory not found". But if i using rclone ls for the source file's root directory, the correct file list will be displayed. (Like this:)

// (error case)
rclone copy "D:/Downloads/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236/[Sakurato] Ryza no Atelier:Tokoyami no Joou to Himitsu no Kakurega [03][AVC-8bit 1080p AAC][CHS].mp4" "D:/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236" -P
// can't work by "directory not found"

// (try ls it's root directory)
rclone ls "D:/Downloads/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236/" -P
355070841 [Sakurato] Ryza no Atelier:Tokoyami no Joou to Himitsu no Kakurega [03][AVC-8bit 1080p AAC][CHS].mp4
// worked and founded the file above

// (success case)
rclone copy "D:/Downloads/LavaAnimeLib/2023年/7月夏/僵尸百分百~在成为僵尸前要做的100件事~ 414461/[Comicat][Zom 100 - Zombie ni Naru made ni Shitai 100 no Koto][02][1080P][GB&JP][MP4].mp4" "D:/LavaAnimeLib/2023年/7月夏/僵尸百分百~在成为僵尸前要做的100件事~ 414461" -P
Transferred:      404.322 MiB / 404.322 MiB, 100%, 76.240 MiB/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:         5.5s

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

rclone v1.63.1
- os/version: Microsoft Windows 10 Enterprise LTSC 2021 21H2 (64 bit)
- os/kernel: 10.0.19044.3208 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.20.6
- go/linking: static
- go/tags: cmount

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

(for source) Local Disk
(for destination) OneDrive, Local Disk

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

rclone copy "D:/Downloads/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236/[Sakurato] Ryza no Atelier:Tokoyami no Joou to Himitsu no Kakurega [03][AVC-8bit 1080p AAC][CHS].mp4" "2AG:/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236" -P

The rclone config contents with secrets removed.

[2AG]
type = onedrive
token = {"access_token":"(hidden)"}
drive_id = (hidden)
drive_type = business

A log from the command with the -vv flag

2023/07/18 15:58:53 DEBUG : rclone: Version "v1.63.1" starting with parameters ["C:\\Program Files\\rclone\\rclone.exe" "copy" "D:/Downloads/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236/[Sakurato] Ryza no Atelier:Tokoyami no Joou to Himitsu no Kakurega [03][AVC-8bit 1080p AAC][CHS].mp4" "D:/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236" "-P" "-vv"]
2023/07/18 15:58:53 DEBUG : Creating backend with remote "D:/Downloads/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236/[Sakurato] Ryza no Atelier:Tokoyami no Joou to Himitsu no Kakurega [03][AVC-8bit 1080p AAC][CHS].mp4"
2023/07/18 15:58:53 DEBUG : Using config file from "C:\\Users\\Administrator\\AppData\\Roaming\\rclone\\rclone.conf"
2023/07/18 15:58:53 DEBUG : fs cache: renaming cache item "D:/Downloads/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236/[Sakurato] Ryza no Atelier:Tokoyami no Joou to Himitsu no Kakurega [03][AVC-8bit 1080p AAC][CHS].mp4" to be canonical "//?/D:/Downloads/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236/[Sakurato] Ryza no Atelier:Tokoyami no Joou to Himitsu no Kakurega [03][AVC-8bit 1080p AAC][CHS].mp4"
2023/07/18 15:58:53 DEBUG : Creating backend with remote "D:/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236"
2023/07/18 15:58:53 DEBUG : fs cache: renaming cache item "D:/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236" to be canonical "//?/D:/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236"
2023-07-18 15:58:53 ERROR : Local file system at //?/D:/Downloads/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236/[Sakurato] Ryza no Atelier:Tokoyami no Joou to Himitsu no Kakurega [03][AVC-8bit 1080p AAC][CHS].mp4: error reading source root directory: directory not found
2023-07-18 15:58:53 DEBUG : Local file system at //?/D:/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236: Waiting for checks to finish
2023-07-18 15:58:53 DEBUG : Local file system at //?/D:/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236: Waiting for transfers to finish
2023-07-18 15:58:53 ERROR : Attempt 1/3 failed with 1 errors and: directory not found
2023-07-18 15:58:53 ERROR : Local file system at //?/D:/Downloads/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236/[Sakurato] Ryza no Atelier:Tokoyami no Joou to Himitsu no Kakurega [03][AVC-8bit 1080p AAC][CHS].mp4: error reading source root directory: directory not found
2023-07-18 15:58:53 DEBUG : Local file system at //?/D:/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236: Waiting for checks to finish
2023-07-18 15:58:53 DEBUG : Local file system at //?/D:/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236: Waiting for transfers to finish
2023-07-18 15:58:53 ERROR : Attempt 2/3 failed with 1 errors and: directory not found
2023-07-18 15:58:53 ERROR : Local file system at //?/D:/Downloads/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236/[Sakurato] Ryza no Atelier:Tokoyami no Joou to Himitsu no Kakurega [03][AVC-8bit 1080p AAC][CHS].mp4: error reading source root directory: directory not found
2023-07-18 15:58:53 DEBUG : Local file system at //?/D:/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236: Waiting for checks to finish
2023-07-18 15:58:53 DEBUG : Local file system at //?/D:/LavaAnimeLib/2023年/7月夏/莱莎的炼金工房 ~常暗女王与秘密藏身处~ 425236: Waiting for transfers to finish
2023-07-18 15:58:53 ERROR : Attempt 3/3 failed with 1 errors and: directory not found
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         0.1s
2023/07/18 15:58:53 INFO  :
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         0.1s

2023/07/18 15:58:53 DEBUG : 2 go routines active
2023/07/18 15:58:53 Failed to copy: directory not found

Unfortunately not a bug (as then it could be fixed) but rclone initial design decisions around characters encoding. It was required to make rclone to operate in user friendly fashion between different operating systems where different characters are allowed. But sometimes it leads to issues especially for languages where full-width characters like , or are commonly used.

For example on Windows full-width is one of the characters rclone uses to escape literal : (which is illegal on Windows but perfectly fine on Unix systems).

try your copy with options --local-encoding None --onedrive-encoding None

Solved. This problem caused by the (full width) in the filename.
You can add a command line argument to avoid it: (but less compatible)

--local-encoding "Slash,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot"

more details:

Yes you can use:

--local-encoding "Slash,BackSlash,Ctl,RightSpace,RightPeriod,InvalidUtf8,Dot"

to be more granular.

--local-encoding  None

is perfect to test if issue is encoding related.

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