Link to home
Start Free TrialLog in
Avatar of dandraka
dandrakaFlag for Greece

asked on

How can i read a rar file, using vbscript?

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
Avatar of rejoinder
rejoinder
Flag of Canada image

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
Avatar of dandraka

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of rejoinder
rejoinder
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks!