Sign in to follow this  
Followers 0
shEiD

(Solved) How to get file list inside the rar archive?

6 posts in this topic

#1 ·  Posted (edited)

Hi,

Is there any way to get the file list from inside the .rar archive? I can't find nothing in winrar.chm, and google gave me nothing ;)

I need to check, if rar file contains only 1 file, if yes, I will store the "original" name in the database, and extract the file renaming it to my preference. The problem is, how the hell, do I get that stinkin file list from inside rar file?

Please, help.

Edited by shEiD

Share this post


Link to post
Share on other sites



You can use UnRaR.exe to make a list file

UnRaR.exe lb "MyRaR archive.rar" > files.txt

Share this post


Link to post
Share on other sites

There is an UNRAR UDF available. Maybe it does what you need.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

You can use UnRaR.exe to make a list file

UnRaR.exe lb "MyRaR archive.rar" > files.txt

@JFX thank You, works like a charm. Wonder why there's nothing about this command in winrar's help? Strange and annoying...

There is an UNRAR UDF available. Maybe it does what you need.

@water I had that UDF, but had completely forgot about it, though, methinks it is too old and crashes on this version of autoit, iirc. Thank You for reminding me, I will try to look into it.

Share this post


Link to post
Share on other sites

hey guys

i have a similar issue ,with a twist

i want to list files in a rar which is itself inside a rar file

then i want to delete files by reading the list files.

any help would be highly appreciated

thanks

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Thanks for the post. Saved me from having to spend any money on that ugly ass win95 looking gui called winrar. Don't mind setting up a bat file and using unrar.exe

Is there any way to filter the results? Not a big deal, just might save a little bit of time :)

Meaning, that I don't want .doc .dll license, readme removed from the myfiles.txt. It would just save me a few minutes of having to open in openoffice , do a find and replace/remove. Versus just open with notepad, have quite a few less results and just scroll through, instead of having to use find.

Edited by joeshoe

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0