Jump to content

1 Screenshot

About This File

I got tired of manually renaming videos and media to match my roms. I tried a few softwares for it, but none worked quite the way I wanted.
You may use it to match anything to your roms/images/XML. Here are a few examples.

 

1: You have an XML file or ROM files. You also have media (movies perhaps) but the names does not match the XML.
2: You have an XML file but your ROM files does not match the XML.
3: You have media files named the way you want, but your ROM files does not match,
4: You have some files that must match other files. Not necessarily HyperSpin/Emulator related.

 

Basically, you set what you want to use for source names (An XML file or a folder containing files).
You also set a source directory that you want to be coped/moved to match the source names.
Then you set a destination directory for where you want the copied/moved files to end up.

 

Anyway, how does it work?
The application cleans up the Source NAMES (From folder or XML) & the Source FILES and puts then into an internal array.
For example:
4x4 Off-Road Racing (USA) (Disk 1).D64
Becomes
4x4 OffRoad Racing

 

So now we have a cleaned up Romname and sourcefile(s). It then runs a Damerau-Levenshtein distance comparison between two strings. Yes, thats right. It computes the edit distance between two strings, that is the number of omissions, insertions, changes or swap of letters necessary to transform one string into the other.
This function is by jchd at the http://www.autoitscript.com forums and the description above is a cut and paste. hehe. You thought I sounded smart, right?

 

In other words, it compares the romname with all the source media and returns the source media that has the least amout of "spelling errors" in it.

 

Is this fast? No, its slow as hell if you have a lot of source media. Say you have 1000 roms and 500 media files.
For every rom file (1000) it has to go through every media file (500) and do the distance comparison on each one of them to find the best match. So this takes a while. The more media files you have, the slower each rom takes.
It will stop looking if it finds a direct match though, so that will speed it up.

 

It will not overwrite or even do the comparison IF you already have the media file for that rom in your destination directory. It does not care about extensions in the destination dir, so if you already have DestinationDir\Colony.MP4 it will not overwrite it later with a file with a different extension (Colony.FLV for example) as it only checks "Does Destination\Colony.* already exist?" and skip it if so.
This is good. Lets give an example. Say you have a mix of FLV and MP4 dupes. Split them up into separate folders.
Run this program, pointing it to one of the folders. Let it run. It will now copy those files.
Run it again, pointing it to the other folder. It will now only copy the files that do not already exist, no matter the extension.

 

It is available on my FTP (signature) and attached to this post with source.

 

How to:
Run the application.
MainScreen13.jpg

 

XML Source: Switch between using a XML or a folder to use for Source Names by clicking the "Switch to files" button. Switch back to XML using the same button.

 

Source files: Select the folder containing the files to be renamed (copied or moved actually).
Pre Strip #: This will strip out the defined number of characters from the start of the source names. This is good if your sourcefiles has a header that you do not want to be included
in the search. For example, your source file(s) are called something like "0001 - Electroplankton (Japan).nds" and the first 7 chars there messes it up (0001 - ). Set this to 7 and it will strip that out. Leave it at 0 to not strip.
Post Strip #: Same as above, but it will strip from the end of the name. Doubt this is needed.

 

Destination: Select the folder to copy/move the renamed files to.

 

The "0" is the number of misspellings to constitute a direct match. These will be copied/moved automatically without question. Recommended to keep it at 0. Its worth going through the manual labor later if you want it right. You can set it to -1 to disable automatic copying all together if you want to verify everything manually.

 

The "2" is the number of "misspellings" to constitute a possible match. If you want "A game" but it finds a Source file called "A_game", it will count as 1 misspelling. It will be added to a list that you'll go through at the end and select the matches.
Note: Releases with higher "spelling errors" will also be shown after this list is displayed, so you will get a chance to match even higher spelling errors.

 

"Move Sourcefiles to Destination": If you check this, any matches from "Source Files" will be moved into "Destination" instead of copied. Never recommended unless you want to rename very large ISO roms collections or something.
If one Sourcefile matches more then one Source Names, it will not allow it and ask you if you want to change to Copy Mode or Quit.

 

"Do not show result windows":. If you check this, it will not show you what file names it found, what file sources or which files that are perfect matches before continuing. The first response needed after clicking "Start" will be to help with the partial matches.

 

"Handle different disks?": Normally, everything in a () will be ignored, but if you check this, it will read inside the () and [] for disk,disc,tape and cart and try to keep them correct as well.
In other words, if you are matching a romset or similar with (Disk 1, Side B) etc (Commodore 64 for example), leave this checked. If the romset does not include it (NES and similar), uncheck it to gain a little bit of speed.

 

"Number of source files found before splitting them based on first char": The default is 10000. Normally, all source files are matched against all sources. This can get VERY slow on large sets with few direct hits (0 spelling errors). If the number of source files exceed 10000, it will split them up into different searches so a source that starts with the letter A will only search for source files also starting with A.
You may lower this number if you want to trigger this search method with a smaller source files set if you want. It will go a lot faster, however you might get missed results if they do not start with the same character ("Star Wars The" & "The Start Wars" for example will be a miss).
After it has indexed the sources and source files, it will display a message if it needs to split them up into different arrays (searches).

 

The "Reset to Default" button simply clears all the fields back to default.

 

Click Start to go on. Don't worry. Nothing will happen automatically yet!

 

This little fella will pop up to give you information on what its doing. You don't actually HAVE to watch it. Its more to show you that its working.

 

Processing.jpg

 

It first goes through the XML or folder you selected to find all the names we want to use and clean them up for matching.

 

It will then present what it found (Unless "Do not show result windows" is checked) and show you the "Rom Name Cleaned" names for each Rom that it will use to match with the source media. Just click the X to continue.
9b.JPG

 

It then goes through the source media and does the same thing (Unless "Do not show result windows" is checked). Click the X to continue.
10b.JPG

 

It will now start the matching and show you in the window what its doing.

 

Once it has gone through all the files, it will display (Unless "Do not show result windows" is checked) those that had low enough spelling errors to be automatically copied (0 in this case).
Those files are copied when you press the X.
Remember, you can hit Shift-ESC at any time (except if a question is on screen) to exit the application.

 

You can see the
Rom Name Clean: The cleaned name of the source name we want to use.
Source Match Clean: The best match it found for it, also cleaned.
Rom Full Name: The real name we want (read from XML or directory).
Source Match Full Name: The best match for it. Real filename, not cleaned.
Misspellings: The number of differences between them. We selected 0 for automatic processing, so this will only contain 0's.
New Name: The new name that will be created in the destination folder. It should match the "Rom Full Name" but with its own extension of course.
12a.JPG

 

When the copy is complete, it will show you the rest of the matches that it needs your help with. We selected 2 here, so only those with 1 or 2 misspellings will be processed.
Simply check the ones you think are a match and click the "Start" button. To skip to the next part, click "Skip". To abort, click "Close" or the X at the top right.
Note: This window is resizable. You may also drag the vertical lines between the headers to increase/decrease the column width (like Excel).
PartialHits.JPG

 

Once all are done, it will also show you the ones that did not get a match, its best match and the number of spelling errors for it. You can select to go through this list as well and check things you think is a match still.
As you can see, I did find one that is a match. It was a non match because of a bug in 1.7 and previous. Fixed in 1.8 (& sign was stripped from XML source names).
NoHits.JPG

 

And thats pretty much it =)

 

Note, everything shown in the lists are also logged to a subdir called "Logs". Its TAB separated lists, so you can just copy and paste it into Excel.


What's New in Version 1.13

Released

  • 1.13
  • * Ability to strip a number of chars from the sourcenames. Both from the start and from the end.
  • I wanted to match a Nintendo DS set where the roms were called "0001 - Electroplankton (Japan).nds", etc. The numbering at the start messed the matching up. It would still work but take a lot longer and give me 5-7 spelling errors on each one, so I added this function so I can strip away the first 7 chars (0001 - ) from the filenames so matching were a lot more exact. Also added the ability to remove chars from the end of the name.
  • * We now do an initial check for each search if there is a direct match for it. If there is, there is no need to search at all. Speeds it up a LOT with direct hits.
  • * The number of sourcefiles found before splitting them into different arrays can now be set in the GUI. Previously it was hidden in the INI file.
  • 1.12
  • * It now handles different number in Disk, Disc, Tape and Cart instead of stripping that information away.
  • 1.11
  • * The fix in 1.8 to change "&" to "and" in the XML was actually done in the real name (decides final name) instead of the cleaned name (only used for matching). This caused the final file to get the wrong name. Now changed. Thanks vaderag for the report =)
  • 1.10
  • * The Browse button for Destination will now take you to the same directory as "Source files", if its set and "Destination" is not.
  • * The status for the "Do not show result windows" checkbox is now saved in the INI file so it will remember your choice.
  • * If the Destination folder does not exist, it will ask if you want to create it when clicking "Start".
  • * Cleaned up some error checking when clicking "Start". It'll check that all seems correct now.
  • * Added a "Reset to Default" button to clear everything back to default values.
  • 1.9
  • * Added a checkbox to not show the 3 arrays at the start. When checked, it will keep running until it has copied the perfect matches.
  • * Switched the AutoCopy limit and PartialMatch limit selections around on the main GUI to make more sense.
  • 1.8
  • * Added a GUI instead of all the questions for "Do these match" at the end.
  • * Also shows a GUI for the stuff that was not a match, incase you want to go through them anyway.
  • * When using a XML as SourceNames, it stripped the "&" sign, causing unneeded mispellings. Now changes it to "and" instead when cleaning up, same as is done for the sources containing an & sign.
  • 1.7
  • * Added a GUI to it instead of the questions at the start. Makes it feel a bit more professional IMO.
  • * Removed all the traytips. Its showing in the GUI now. Besides, it kinda crashed explorer on my Windows 10 machine...
  • * Fixed a problem. If the first sourcefile was found to be a match for something, it was not found to be an actual match. Thanks autoit, not.
  • * The last array displayed, that which showed unmatched sources, only showed those that found a partial match. It now also shows those that found no match at all, with "NA" as its matched content.
  • Upvote 2
  • Super Like 2



×
×
  • Create New...