DonationCoder.com Software > Post New Requests Here
IDEA: Batch read nfo files in RAR archives
wetsmellydog:
I am starting to clean out a bunch of software program files from years ago.
Some are in ZIP format but most are RAR. Inside these compressed files is an information text file with the extension of .nfo.
I would like to be able to copy the name of the archive and the text of the nfo file to a separate file so that I can determine if I want to keep or delete the archive. It is also helpful when I archive to a cd/dvd as a content file.
There are plenty of programs that will search out a ZIP file and do just what I want but not any that work with RAR that I have found. I am willing to use command line batch file if anyone is knowledgeable about the RAR archive program.
As always, many thanks in advance!
Nod5:
I think the command line tool UnRAR , http://www.rarlab.com/rar_add.htm , can do what you want, at least in combination with some scripting language like autohotkey.
this command line phrase would extract only .nfo files from the archive:
--- ---unrar e -n*.nfo ARCHIVE_NAME.rarI don't have time to put together a working script at the moment. :-[ But hopefully you or someone else can do it.
mouser:
You could combine nod5's commandline hint with my drag+drop robot program to handle lots of files:
https://www.donationcoder.com/Software/Mouser/dragdrop/index.html
skrommel:
:) Try TheDIZs!
Extracts DIZ- and NFO-files from RAR-files.
Place UnRar.exe from www.winrar.com in the same folder as TheDIZs.
You can run it to have it ask for a root folder, or add a folder to the command line.
Skrommel
--- ---;TheDIZs.ahk
; Extracts DIZ- and NFO-files from RAR-files.
; Place UnRar.exe from www.winrar.com in the same folder as TheDIZs
;Skrommel @ 2008
#SingleInstance,Ignore
#NoEnv
SetBatchLines,-1
If 0=0
{
FileSelectFolder,start,,3,Select a folder to search for RAR files
If start=
{
MsgBox,0,TheDIZs,You didn't select a folder.
ExitApp
}
}
Else
start=%1%
crlf:=Chr(13) . Chr(10)
folder:=A_Now
FileDelete,TheDIZs.txt
FileAppend,Scan started %A_Now%%crlf%,TheDIZs.txt
Loop,%start%\*.rar,0,1
{
FileCreateDir,%A_Temp%\%folder%\
archive:=A_LoopFileLongPath
TrayTip,TheDIZs,Scanning %archive%
RunWait,unrar e -n*.diz -p- %archive% %A_Temp%\%folder%\,,Hide
RunWait,unrar e -n*.nfo -p- %archive% %A_Temp%\%folder%\,,Hide
Loop,%A_Temp%\%folder%\*.*
{
diz:=A_LoopFileLongPath
FileRead,content,%diz%
FileAppend,-----------%crlf%%archive%%crlf%-----------%crlf%%content%%crlf%%crlf%%crlf%,TheDIZs.txt
FileDelete,%diz%
}
}
FileRemoveDir,%A_Temp%\%folder%\
FileAppend,Scan stopped %A_Now%%crlf%,TheDIZs.txt
Run,TheDIZs.txt
f0dder:
You pirates! :)
Navigation
[0] Message Index
[#] Next page
Go to full version