How to flatten directory at mount

I have a bunch of subfolders like

remote/A/01/file 1
remote/A/02/file 3
remote/B/01/file 4a

And I would like to merge everything after the letters.

I tried something like this

[union]
type = union
upstreams = 2:A* 1:A* 2:B* 1:B*

But appears wildcards are not supported. Since I have lots of subfolders I would have to write a very large config file.

Is there any other way? And if not is there a limit in number of upstreams ?

I can't move any of the files on the remotes itself.

I tried to just add all the subfolders but now I get this error

Failed to create file system for "union:": can't use empty string as a path

But all paths seem correct for me

Nobody can see your screen. Post all details if you want somebody to have a look and try to help.

I decided to try with just 5 paths to check if the issue would happen instead of all my folders

[test]
type = union
upstreams = cf:/0-9/01  cf:/0-9/01 cf:/A/A1  cf:/A/A10  cf:/A/A2

Tested all of them with rclone ls, but rclone mount doesn't work

rclone mount test: test -vvv
<7>DEBUG : rclone: Version "v1.62.2" starting with parameters ["rclone" "mount" "test:" "test" "-vvv"]
<7>DEBUG : rclone: systemd logging support activated
<7>DEBUG : Creating backend with remote "test:"
<7>DEBUG : Using config file from "/home/alx/.config/rclone/rclone.conf"
<7>DEBUG : Creating backend with remote "cf:/A/A2"
<7>DEBUG : Creating backend with remote "cf:/A/A1"
<7>DEBUG : Creating backend with remote "cf:/A/A10"
<7>DEBUG : Creating backend with remote "cf:/0-9/01"
<7>DEBUG : Creating backend with remote "cf:/0-9/01"
<7>DEBUG : Creating backend with remote "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/8ft2nlg4uk8dbeqlekmduuuuvg"
<7>DEBUG : Creating backend with remote "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/1ep0c6og6p7pcj5qhqr0or97ng"
<7>DEBUG : Creating backend with remote "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/0qqv95ae82qsqrgbit7fkld844/9gpbtjq1hn38l8asn0c9v44u58"
<7>DEBUG : Resolving service "s3" region "us-east-1"
<7>DEBUG : Resolving service "s3" region "us-east-1"
<7>DEBUG : Resolving service "s3" region "us-east-1"
<7>DEBUG : Creating backend with remote "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/0qqv95ae82qsqrgbit7fkld844/9gpbtjq1hn38l8asn0c9v44u58"
<7>DEBUG : Resolving service "s3" region "us-east-1"
<7>DEBUG : Creating backend with remote "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/uddjaqv4ne0tn15oi6m1u71vug"
<7>DEBUG : Resolving service "s3" region "us-east-1"
<7>DEBUG : fs cache: renaming cache item "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/1ep0c6og6p7pcj5qhqr0or97ng" to be canonical "cfcrypt:lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/1ep0c6og6p7pcj5qhqr0or97ng"
<7>DEBUG : fs cache: switching user supplied name "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/1ep0c6og6p7pcj5qhqr0or97ng" for canonical name "cfcrypt:lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/1ep0c6og6p7pcj5qhqr0or97ng"
<7>DEBUG : fs cache: renaming cache item "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/uddjaqv4ne0tn15oi6m1u71vug" to be canonical "cfcrypt:lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/uddjaqv4ne0tn15oi6m1u71vug"
<7>DEBUG : fs cache: renaming cache item "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/8ft2nlg4uk8dbeqlekmduuuuvg" to be canonical "cfcrypt:lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/8ft2nlg4uk8dbeqlekmduuuuvg"
<7>DEBUG : fs cache: switching user supplied name "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/uddjaqv4ne0tn15oi6m1u71vug" for canonical name "cfcrypt:lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/uddjaqv4ne0tn15oi6m1u71vug"
<7>DEBUG : fs cache: switching user supplied name "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/8ft2nlg4uk8dbeqlekmduuuuvg" for canonical name "cfcrypt:lt4ae5rbpkflfo50f08qv3r3ac/kq8mjrst8pdu7s4ula4kufg96o/8ft2nlg4uk8dbeqlekmduuuuvg"
<7>DEBUG : fs cache: renaming cache item "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/0qqv95ae82qsqrgbit7fkld844/9gpbtjq1hn38l8asn0c9v44u58" to be canonical "cfcrypt:lt4ae5rbpkflfo50f08qv3r3ac/0qqv95ae82qsqrgbit7fkld844/9gpbtjq1hn38l8asn0c9v44u58"
<7>DEBUG : fs cache: renaming cache item "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/0qqv95ae82qsqrgbit7fkld844/9gpbtjq1hn38l8asn0c9v44u58" to be canonical "cfcrypt:lt4ae5rbpkflfo50f08qv3r3ac/0qqv95ae82qsqrgbit7fkld844/9gpbtjq1hn38l8asn0c9v44u58"
<7>DEBUG : fs cache: switching user supplied name "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/0qqv95ae82qsqrgbit7fkld844/9gpbtjq1hn38l8asn0c9v44u58" for canonical name "cfcrypt:lt4ae5rbpkflfo50f08qv3r3ac/0qqv95ae82qsqrgbit7fkld844/9gpbtjq1hn38l8asn0c9v44u58"
<7>DEBUG : fs cache: switching user supplied name "cfcrypt:/lt4ae5rbpkflfo50f08qv3r3ac/0qqv95ae82qsqrgbit7fkld844/9gpbtjq1hn38l8asn0c9v44u58" for canonical name "cfcrypt:lt4ae5rbpkflfo50f08qv3r3ac/0qqv95ae82qsqrgbit7fkld844/9gpbtjq1hn38l8asn0c9v44u58"
Failed to create file system for "test:": can't use empty string as a path

These are the same path - you can remove one

Can confirm now that issue is trying to mount the crypt mount directly doesn't work, but I can mount the union using the encrypted paths

[cfcrypt]
type = s3
provider = Cloudflare
access_key_id = xxxx
secret_access_key = xxxx
endpoint = xxxx
acl = private

[cf]
type = crypt
remote = cfcrypt:
password = xxxxxx
password2 = xxxxxxxx

@ncw I think it's a bug, or is it a known issue?