[Custom Script] Making EmuELEC read rom folders from external and internal storage

A while ago I made a script with a friend so we could have our EmuELEC to read roms from an external drive, the script consisted of making a symlink for every external game rom, which took a while to run.

This version, however, creates a symlink for every console folder found on the external drive.

You can check it out at GitHub - GuiCoppini/emuelec-scripts: Repository containing some custom EmuELEC scripts
Also, feel free to contribute as you wish!

Please note that this was not mass-tested and was only tested on EmuELECs installed in internal memory (not tested on EmuELECs booted by SDCard).

It is also unknown what could happen if you have the same console folderon many external drives.

To run the scripts, save them as .sh files (example: folder_links.sh and clear_folder_links.sh) and leave them in “/emuelec/scripts”. Open the user-scripts on your EmuELEC, run them and reboot the console.

1 Like

Did a quick check and find a problem: If a same system exists on multiple external drives, then only the last one in alphabetical order will be used

You could call the clear script first in create script, and skip the folders where target link already exists, or maybe this can be solved in a per-system external option or per-rom link (would be slow, though)

1 Like

Hmm good one, I knew that something weird would happen if the console existed on many drives, I just had no idea of what I should do… I might change it to make as you suggested of just considering the first system found, what do you think?

My dream is to give a little prompt like “N64 was found on X and Y drives, which one do you want to use?”, but I think it goes further than just bash scripts.

The old script I had was a per-rom link, it was waaaaay slower to run and I like the per-console style because not only it is faster, but it also takes the “images” folder together, so I can scrape roms via EmuELEC and have the images being downloaded into the external drive.

I prefer EmuELEC reading roms from a NAS, and it’s not difficult to implement

Sorry I might be missing the point, but I do not understand why this script is needed. EmuELEC already mounts external drives ROMS on external USB media · EmuELEC/EmuELEC Wiki (github.com) automatically or via the EmuELEC settings menu in Emulationstation. Unless this is meant to have both internal and external at the same time?

The script is not needed at all, it’s a custom thing as an extra. It was mainly made so that I could use my 1TB external HD as a place to add roms that I would not want occupying the internal storage, for example PSP and PS1 games. The ideia is purely when someone wants to have some consoles on one storage and other consoles on other storage; good SD Cards with a high capacity are sometimes expensive and I had an old HDD that I could use to carry some extra games.

I keep the “main” games on the internal drive, such as megadrive, snes, nes etc, and the occasional ones on the external drive, such as PSP, PS1, NDS etc.

Ah there it is, yeah after looking at the script I understand what you are doing, this allows both internal and external to have roms. Thanks

P.S. I have edited the title to reflect this.

In fact, to achieve this, I think it is completely possible to add the roms path selection function in the emuelec menu, so that as long as the external or internal roms specify the path, the system can easily access the game roms with the new path after restarting.