?
Solved

How can i read a rar file, using vbscript?

Posted on 2009-02-24
4
Medium Priority
?
906 Views
Last Modified: 2012-05-06
I have a rar file and i want to read file's content,
i know how i can read a zip file but i cannot do the same to a rar file
TIA
0
Comment
Question by:dandraka
  • 2
  • 2
4 Comments
 
LVL 14

Expert Comment

by:rejoinder
ID: 23726022
Here are two links to look at - the first is the article discussing reading a rar file, the second is the active x control which is called from within the script.
Article
http://www.example-code.com/vbscript/rar_list.asp
Active X control
http://www.chilkatsoft.com/download/ZipActiveX.msi
0
 
LVL 8

Author Comment

by:dandraka
ID: 23731496
using this code i can read the contentes of a zip file:
'***************************************************************************
set myshell=createobject("wscript.shell")
set filesys=createobject("scripting.filesystemobject")
DESKTOP = myshell.specialFolders("DESKTOP")
FILEPATH = DESKTOP & "\test\mytest.zip"
contents=atesinfo.ReadFilesInZip(filepath)
Set objApp = CreateObject("Shell.Application")
Set objContents = objApp.NameSpace(FILEPATH).Items()
For Each objItem in objContents
    msgbox  objItem.Name
Next
'***************************************************************************
i suppose that i cannot create a similar script for a rar file,
without using an active x control
am i right?
TIA
0
 
LVL 14

Accepted Solution

by:
rejoinder earned 2000 total points
ID: 23735561
That is right.  The zip technology was incorporated into Windows so scripts have access to the code.  Rar was written by another organization so we are stuck using tools like this Active X control.
0
 
LVL 8

Author Comment

by:dandraka
ID: 23742628
thanks!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question