djvj Posted April 23, 2013 Posted April 23, 2013 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. "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music."RocketLauncher's Official Home If you appreciate my work:My Apps:Window LoggerIdle Volume AdjusterExplorerRestorerRom Folder CleanerModule UpdaterMy Guides:How To Mod Guncons with Aimtrak
tastyratz Posted April 23, 2013 Author Posted April 23, 2013 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
bleasby Posted April 23, 2013 Posted April 23, 2013 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. When asking for help for RocketLauncher, POST ON THE RLAUNCHER.NET FORUMS! Also, please post your RocketLauncher.log with logging level set to troubleshooting in pastebin (set the log level in RocketLauncherUI, global system > General Settings -> RocketLauncher). Ass. Bleasby - RocketLauncher Development Team.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.