Evaluating Subfolders and files with spaces

What is the problem you are having with rclone?

I am trying to use the sync command to transfer about 1TB of files on a hard drive with a Google Drive folder. Many subfolders and filenames have spaces in them, so this is causing an error when the process calls "readdir." Is there a flag or option I can use to ensure all file and directory names are evaluated within quotes or an escape character is added? Also, i would like to maintain the metadata in all files, particularly the creation date.

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

rclone v1.69.1

  • os/version: darwin 15.3.1 (64 bit)

  • os/kernel: 24.3.0 (arm64)

  • os/type: darwin

  • os/arch: arm64 (ARMv8 compatible)

  • go/version: go1.24.0

  • go/linking: dynamic

  • go/tags: none

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)

rclone sync "/Volumes/Images" "Google_Drive:IntermediatePhotos"

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

[Google_Drive]
type = drive
scope = drive
token = XXX
team_drive = 

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

2025/03/20 09:27:40 ERROR : 2017 Picture Transfers: error reading source directory: failed to read directory entry: readdir /Volumes/Images/2017 Picture Transfers: invalid argument

welcome to the forum,

that should not an issue.

please post a full debug log, not a one-line snippet.


rclone sync d:\zork gdrive01:zork -vv
DEBUG : rclone: Version "v1.69.1" starting with parameters ["rclone" "sync" "d:\\zork\\" "gdrive01:zork" "-vv"]
DEBUG : Creating backend with remote "d:\\zork\\"
DEBUG : Using config file from "d:\\data\\rclone\\rclone.conf"
DEBUG : fs cache: renaming cache item "d:\\zork\\" to be canonical "//?/d:/zork"
DEBUG : Creating backend with remote "gdrive01:zork"
DEBUG : Added delayed dir = "2017 Picture Transfers", newDst=<nil>
DEBUG : Added delayed dir = "2017 Picture Transfers/f older", newDst=<nil>
DEBUG : 2017 Picture Transfers/f older/f ile.ext: Need to transfer - File not found at Destination
DEBUG : Google drive root 'zork': Waiting for checks to finish
DEBUG : Google drive root 'zork': Waiting for transfers to finish
DEBUG : 2017 Picture Transfers/f older/f ile.ext: md5 = bde534c13d4308bc75873900b0ddd75b OK
INFO  : 2017 Picture Transfers/f older/f ile.ext: Copied (new)
DEBUG : Waiting for deletions to finish
INFO  : 2017 Picture Transfers/f older: Set directory modification time (using DirSetModTime)
INFO  : 2017 Picture Transfers: Set directory modification time (using DirSetModTime)
INFO  : f older: Removing directory
DEBUG : f older: Rmdir: contains trashed file: "f ile.ext"
DEBUG : f older: Rmdir: contains trashed file: "f ile.ext"
DEBUG : Google drive root 'zork': deleted 1 directories
INFO  :
Transferred:        1.454 KiB / 1.454 KiB, 100%, 372 B/s, ETA 0s
Deleted:                0 (files), 1 (dirs), 0 B (freed)
Transferred:            1 / 1, 100%
Elapsed time:         4.9s
rclone tree gdrive01:zork
/
└── 2017 Picture Transfers
    └── f older
        └── f ile.ext

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