Syncing only one file per folder

i'm syncing a big list of games roms files with rclone.
My issue is, for each game there is a folder, and inside each folder, there is the different version of it, for different region. For exemple, one will be "game (E).rom" for EUR and another will be "game (U).rom" for USA.
But i only want one rom for each game, i don't need to download all of it (sometime there is a lot of files !)
I'm looking for a way to to have only one file per folder. By preference, the one with (E) in its name, or the first one in the folder if no such file exist.
Is this even possible ?
If not, any idea or command that could help me to automate the cleaning process on my side ? (but i would really prefer to be able sync cleanly directly)

My command right now :

rclone sync -P --max-size 1M --http-url :http:/27/items/retroachievements_collection_v5/NES E:\Roms\NES

start here I reckon:

--include - Include files matching pattern

in the end, i decided to filter them all out manually. i have thousands of files to check, wish me good luck xD



--include-from include.txt

tried that?

perhaps better


+ *.rom
- *(*)*.rom
+ *(E)*.rom
- *

--filter-from filters.txt

note I have no experience with filters, just going by examples on the wiki

test with rclone ls remote: --filter-from filters.txt

Well, i can't do these things, because there might be several version with (E), and sometime not a single one.
I already did a nice job of manually sorting them (i managed to sort roms for 4 systems already), but i wanted to avoid that, because i can't update it in the future when new roms are added, i would have to sort everything by hand again. But it's fine i guess, by manually choosing the best rom, i'm sure to always have a great rom. Sometime the choice is a bit tricky, and could have not been automated anyway.
Thanks anyway guys :slight_smile:

It's the complete collection of games compatible with retroachievements, it's very awesome ^^
Check it if you guys are interested in emulation : Full Retroachievements collection, Updated Dec 9, 2022 : Free Download, Borrow, and Streaming : Internet Archive

Perhaps you are looking for something like this:

rclone lsl --files-from mygames.txt --http-url http:/27/items/retroachievements_collection_v5/NES

Where mygames.txt contains your selections like this:

1943 - The Battle of Midway/1943 - The Battle of Midway (U) [!].zip
Adventure Island/Adventure Island (E) [!].zip
Battle of Olympus, The/Battle of Olympus, The (E) [!].zip

Then you only have to do the selections once. The same filtering can be used with your sync after testing with lsl.

interesting :o
i'll keep that on the side for when i need to update :wink:
thanks :slight_smile:

1 Like

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