Rclone mount with other empty folder

What is the problem you are having with rclone?

I use "rclone mount --filter-from filt.txt" to mount my Google Drive.
I only want to see .nfo and video files, so I use --filter-file.
But I see a lot of empty folders.
Can I only see folders with files and ignore empty folders?

What is your rclone version (output from rclone version)

rclone v1.56.2
- os/version: ubuntu 21.04 (64 bit)
- os/kernel: 5.11.0-1021-raspi (aarch64)
- os/type: linux
- os/arch: arm64
- go/version: go1.16.8
- go/linking: static
- go/tags: none

file list :

โ”œโ”€โ”€ test11 // The contents of the folder are other files, such as *.jpg, but they are empty
โ”œโ”€โ”€ Hidan no Aria
โ”‚   โ”œโ”€โ”€ Season 01
โ”‚   โ”‚   โ”œโ”€โ”€ [VCB-Studio] Hidan no Aria [01][1080p][x264].mp4
โ”‚   โ”‚   โ”œโ”€โ”€ [VCB-Studio] Hidan no Aria [01][1080p][x264].nfo
โ”‚   โ”‚   โ”œโ”€โ”€ [VCB-Studio] Hidan no Aria [01][1080p][x264]-thumb.jpg
โ”‚   โ”œโ”€โ”€ test  // The contents of the folder are other files, such as *.jpg, but they are empty
โ”‚   โ””โ”€โ”€ tvshow.nfo
โ””โ”€โ”€ Hidan no Aria AA
    โ”œโ”€โ”€ Season 01
    โ”‚   โ”œโ”€โ”€ [Snow-Raws] ็ท‹ๅผพใฎใ‚ขใƒชใ‚ขAA ็ฌฌ01่ฉฑ (BD 1920x1080 AVC).mp4
    โ”‚   โ”œโ”€โ”€ [Snow-Raws] ็ท‹ๅผพใฎใ‚ขใƒชใ‚ขAA ็ฌฌ01่ฉฑ (BD 1920x1080 AVC).nfo
    โ”‚   โ”œโ”€โ”€ [Snow-Raws] ็ท‹ๅผพใฎใ‚ขใƒชใ‚ขAA ็ฌฌ01่ฉฑ (BD 1920x1080 AVC)-thumb.jpg
    โ””โ”€โ”€ tvshow.nfo

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 cmd:

rclone mount --filter-from test_filt.txt "SA:{ID}" /home/andy/test  \
--umask 0000 \
--default-permissions \
--allow-other \
--allow-non-empty \
--transfers 4 \
--buffer-size 32M \
--dir-cache-time 12h \
--vfs-read-chunk-size 32M \
--vfs-read-chunk-size-limit 1G \
--vfs-cache-mode writes \
--check-first \
--fast-list \
--daemon \


+ *.nfo
+ Season */*
- *

You'd need someway to define a pattern for empty folders as there's no way to just ignore them via rclone.

I'd remove and not use that as it causes issues with overmounting.

Does nothing on a mount.

Does nothing on a mount.

In fact, I only need *.nfo file and folder "Season */"
So I write the test_filter.txt

+ *.nfo
+ Season */*
- *

But it still contains empty folders like "test11".
Do you have any suggestions?

Rclone filtering is based on files not directories so if there are no files to match against, not sure what you can do.

What problem are you trying to solve with empty directories and why not just remove them if they are problematic?

I see... my bad.
I misunderstood it can be filtered by directory.

The directories aren't empty in my google drive.
It just becomes empty after being mounted locally.
I hope it will not show up after mounting.

Iโ€™m also pretty use transfers does nothing on mount too.

Iโ€™m considering adding to the docs about flags that donโ€™t do anything on mount and serve.

Transfers impacts uploads albeit that's pretty recent.


It's noted there.

1 Like

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