Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Changing drive letters in game lists  (Read 3445 times)

0 Members and 1 Guest are viewing this topic.

ChrisK

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 23, 2017, 12:06:50 pm
Changing drive letters in game lists
« on: March 18, 2012, 10:32:53 pm »
I'm switching PCs in my cabinet and on the new computer I have all my stuff on a different hard drive.  I went through Mala and changed all the paths to point from C: to E:, but it seems all my Mala game lists have the full path in each ROM name, including the drive letter.  I don't see a way to change this in a batch, so it appears all my game lists are now non-functional.

Does anyone know how I might edit all my game lists to change the ROM paths from C: to E: in an automated fashion?  I have way too many list entries to do it one-by-one manually, and it doesn't seem the file format is text-based, where I could just go in with a text replace tool.

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: Changing drive letters in game lists
« Reply #1 on: March 19, 2012, 09:30:09 am »
if all you're doing is changing C: to E: in your lists, then a binary search+replace tool would do the job.
something like this maybe:
http://www.funduc.com/srbinary1.htm


If you have different paths on C: as you do on E:, then you are likely screwed, unless your new path is the same length.

Make backups first! 

ChrisK

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 23, 2017, 12:06:50 pm
Re: Changing drive letters in game lists
« Reply #2 on: March 19, 2012, 02:52:51 pm »
Ah, I didn't consider that the C: might not be encoded in the binary files.  I only noticed that they weren't text and moved on.

I'll give that a shot.  Thanks for the suggestion!

NOP

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 916
  • Last login:September 19, 2017, 08:22:27 pm
  • I stole my avatar.
    • winterMAME
Re: Changing drive letters in game lists
« Reply #3 on: March 20, 2012, 09:07:18 am »
C: should be in there, I was just trying to say if you wanted to change from:

C:\mala\mame\roms

to

e:\documents and settings\mame\roms

you'd be screwed because the length of the path itself is different, and you can't just insert additional data inside a binary file.


ChrisK

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 23, 2017, 12:06:50 pm
Re: Changing drive letters in game lists
« Reply #4 on: March 20, 2012, 09:12:04 am »
Thankfully all I needed to do was change c:\roms\mame to e:\roms\mame, so the single byte replace you suggested worked perfect!  I did it last night and tested all the lists; no problems.

Thanks for the suggestion, you saved me a TON of time rebuilding lists!

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
Re: Changing drive letters in game lists
« Reply #5 on: March 23, 2012, 01:26:23 am »
The other way to solve this (if C: is formatted with NTFS) is to create a junction using Junction

c:\downloads\junction.exe c:\mala\mame\roms "e:\documents and settings\mame\roms"

Junctions cause your computer to be redirected from one directory to another, e.g. the roms directory on C: to the roms directory on E:

Advantage - no programs or configuration files have to be changed. It just works.

Disadvantage - c:\mala\mame\roms can't have it's own content and be a junction over to e: (junctions wouldn't 'combine' the two)
Disadvantage - Junctions are notextra copies. They're more like a detour sign. Although Explorer will think that c: and e: both have 30GB of roms; if you delete a file from either, it's gone.

ChrisK

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 96
  • Last login:April 23, 2017, 12:06:50 pm
Re: Changing drive letters in game lists
« Reply #6 on: March 23, 2012, 08:09:32 am »
Every time I come across a good use for NTFS junction points I get nervous and back away.  I've used symlinks on Linux and OSX and like the concept, I guess I just have a prejudice against them in Windows because of my former nightmares using SUBST.  Totally unfair, I know.  I really need to get familiar with junction points before I need it at work and the other guys see the fear in my eyes.  :)

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
Re: Changing drive letters in game lists
« Reply #7 on: March 24, 2012, 02:59:35 pm »
...get familiar with junction points before I need it at work...

They're great at work for bailing people out of tight spots. Someone's out of space because they put their app's data directories on C:? Move them to the data drive (which is probably sitting there empty) or a new volume, and add the reparse point. It's a crutch, but it's better than having an outage.

At home, I use them to shuffle things (usually games) on and off of my SSD depending on what I'm 'into' that week/month. They also let me boot from different drives, but still have my c:\games and c:\util directories available from each OS.

Hard links aren't usually needed at home, but you can do those too... Wouldn't you be popular if you could seed multiple versions of a library from just the space of your latest one and the differences?

So don't be afraid. Just be careful.