Author Topic: Splipather, copy your retro files in a USB with a structure to find them easily  (Read 458 times)

0 Members and 1 Guest are viewing this topic.

Offline CPCBEGIN

  • CPC664
  • ***
  • Posts: 51
  • Country: es
  • Retro & GNU/Linux
    • Malagueños originales y libres
    • Awards
Here you are a GNU/Linux script than search in a source folder files with an extension and copy them to other destination path with a diferent structure where the name of the folder is first level is the first letter of the file, second one is the second, etc... to get easy to find files in a gotek or cpcduino by example.

I add normalization to avoid FAT32 problems (all files and directories in lowercase, change spaces to _, make destination path only with name and letter of file name).

For example: we have a file called 3D Grand Prix.DSK, this will copied in destination path (using default 3 levels):3/d/g/3d_gran_prix.dsk
We avoid problems with double files.

Our data will be like this:



Here you are some instructions (only on Spanish by the moment).
« Last Edit: 11:40, 01 March 21 by CPCBEGIN »
like
0
No reactions
Retro & opensource

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.119
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
    • Awards
That's interesting, but isn't a three-level structure overkill? Honestly I've never used more than two levels, and the second level is for an entire platform (for instance the SD on my Analogue Mega Sg has a few folders for Megadrive ROMS and a separate folder containing folders with SMS ROMs)...
like
0
No reactions

Offline CPCBEGIN

  • CPC664
  • ***
  • Posts: 51
  • Country: es
  • Retro & GNU/Linux
    • Malagueños originales y libres
    • Awards
splitpather START_PATH DESTINATION_PATH [EXT] [DEPTH]
First two parameters are mandatory but you can define the extension of the files and the depth.
I suppose than 3 levels is good for Amstrad DSKs but too much for console ROMs.
like
0
No reactions
Retro & opensource

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.119
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
    • Awards
Of course each of us has their own preferences, what works for one doesn't work for another, that's for sure.

For me, instead of going deep, I like going a bit more wide; instead of having three levels I much prefer to split heavily populated folders into two or three, for instance M will become MA-ME/MF-MN/MO-MZ...
like
0
No reactions