Can't use size command if the target folder has spaces in it

What is the problem you are having with rclone?

Hello.

I can't use size command if remote folder has a space in its name. I've searched and haven't found the exact same problem; however, several topics mentioned this problem with other commands (like copy), so I tried a few recommendations from those. See the results below.

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

rclone v1.65.2
- os/version: Microsoft Windows 10 Pro 22H2 (64 bit)
- os/kernel: 10.0.19045.3930 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.21.6
- go/linking: static
- go/tags: cmount

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

Webdav server

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

rclone.exe size 'tmn_webdav:media/TV shows'
2024/01/31 13:34:44 ERROR : : error listing: directory not found
2024/01/31 13:34:44 Failed to size with 2 errors: last error was: directory not found

rclone.exe size tmn_webdav:media/'TV shows'
2024/01/31 13:36:45 ERROR : : error listing: directory not found
2024/01/31 13:36:45 Failed to size with 2 errors: last error was: directory not found

rclone.exe size '"tmn_webdav:media/TV shows"'
2024/01/31 13:36:49 ERROR : : error listing: directory not found
2024/01/31 13:36:49 Failed to size with 2 errors: last error was: directory not found

rclone.exe size "'tmn_webdav:media/TV shows'"
2024/01/31 13:36:52 Failed to create file system for "'tmn_webdav:media/TV shows'": config name contains invalid characters - may only contain numbers, letters, `_`, `-`, `.`, `+`, `@` and space, while not start with `-` or space, and not end with space

this is not a bug but you not knowing how to use your shell.

Using bash shell:

$ rclone size 'onedrive:test test'
Total objects: 134
Total size: 1.126 GiB (1208978984 Byte)

$ rclone size "onedrive:test test"
Total objects: 140
Total size: 1.978 GiB (2123884535 Byte)

You are on Windows and I am not familiar with this OS but try simple:

rclone.exe size "tmn_webdav:media/TV shows"

or Google about your specific shell usage instructions.

I tried that simple trick :slight_smile: Forgot to mention it in the task description. The result is the same.

rclone size "tmn_webdav:media\TV shows"
2024/01/31 14:20:46 ERROR : : error listing: directory not found
2024/01/31 14:20:46 Failed to size with 2 errors: last error was: directory not found

Single quotes usually work. You're correct, it was me doing something wrong, but it wasn't the quote mark usage; I just forgot case sensitivity. :man_facepalming:

rclone.exe size tmn_webdav:media/'TV Shows'
Total objects: 708
Total size: 575.138 GiB (617550255792 Byte)

Cool. Thx for sharing.

Good to know that Windows shell works similarly. I was not sure if it is not something very different:)

1 Like

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