Jump to content
Download Section Back Up, Navigate the Right Hand Menu to find files, ignore the 0s

Idea to support multiple rom naming schemes and make things much cleaner


tastyratz

Recommended Posts

Please forgive my ignorance here as I am not a programmer and only somewhat assume the ramifications, but could we assume an archive and search by extension type? i.e. when an archive is detected with that file name, but a file with a valid extension by the same name is also detected - ignore the archive. If the archive is there but the preferred file extension is not, treat as archive.

The assumption is that the archive name does not follow suit with the rom naming - and this is sometimes but not always the case.

So the main reason I cannot just grab whatever filename exists by matching the extension is the output of the archive that I'm given. This example shows I cannot determine with 100% certainty where the romName starts when dealing with roms that start with numbers:

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
                   .....      1572864       520177  2020 Super Baseball (USA).sfc
------------------- ----- ------------ ------------  ------------------------
                              1572864       520177  1 files, 0 folders

If 7z gave me a clean output w/o all the numbers, I might be able to make it work. Regex might be able to grab it, but I'm not the best at it.

Link to comment
Share on other sites

not if you do a "7z.exe -l -slt xzy.7z" first. Then 7z.exe outputs a much more structured file list of the contents. Do that before extraction and you should be able to pull the name

what you get looks more like this

Path = ddraw.ini

Size = 18090

Packed Size =

Modified = 2011-12-06 16:44:29

Attributes = ....A

CRC = 21C45193

Encrypted = -

Method = LZMA:768k

Block = 0

Path = translations\french.ini

Size = 428

Packed Size =

Modified = 2011-12-07 03:18:23

Attributes = ....A

CRC = 1F524903

Encrypted = -

Method = LZMA:768k

Block = 0

Link to comment
Share on other sites

If the 7z output always follows the structure that you posted, it is really easy to make the regex for it as the file name will always start in each line at the same character count as the title "Name".

I can do the regex for you djvj if you want it. Just let me know.

If you want to do the same thing with only StringTrim and StringGet commands, just take a look at the keycapture script at my dropbox folder.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...