Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


zip search script help

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,57517
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> zip search script help
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 zip search script help - 3/5/2008 8:06:40 AM   
  cmontr

 

Posts: 4
Score: 0
Joined: 3/5/2008
Status: offline
Can someone tell me please if there is a way to run a script that can search an ID in over 200 zipped files in winzip. One zip file contains 4 txt file wich I need to search just one of them. And this will be done for 200 zip folders and 6 differnet servers. Thanks so much in advance. 
 
 
Post #: 1
 
 RE: zip search script help - 3/5/2008 8:53:10 AM   
  ebgreen


Posts: 4971
Score: 31
Joined: 7/12/2005
Status: offline
So you need to search the zip files for a specific file? Or you need to search in the files inside the zips for a string?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to cmontr)
 
 
Post #: 2
 
 RE: zip search script help - 3/5/2008 9:48:08 AM   
  cmontr

 

Posts: 4
Score: 0
Joined: 3/5/2008
Status: offline
I need to search an ID in a text file which is in a zip archieve folder. ID is like " AB12345". But archieves are like more then 60 of them and groving since they are zipped daily from the database. Each archieve zip folder contains some files in it but I am interested in one particular text file that contains ID's activities, for instance A.txt. I would appreciate if you can help how to search...thank you in advance...

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: zip search script help - 3/5/2008 9:54:52 AM   
  ebgreen


Posts: 4971
Score: 31
Joined: 7/12/2005
Status: offline
Here is a thread that discusses zipping and unzipping files. See if it gets you started in the right direction. Here is basicaly what you need to do:

For Each zip file in a folder
   Unzip the file to a temporary folder
   For each file in the temporary folder
       See if the ID you are looking for is in the file
   Loop
   Delete all the files in the Temp folder
Loop

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to cmontr)
 
 
Post #: 4
 
 RE: zip search script help - 3/5/2008 10:09:32 AM   
  cmontr

 

Posts: 4
Score: 0
Joined: 3/5/2008
Status: offline
Thanks for the logic...I will work on some sample code ....By any chance do you have any samples?

Thanks again

< Message edited by cmontr -- 3/5/2008 10:10:36 AM >

(in reply to ebgreen)
 
 
Post #: 5
 
 RE: zip search script help - 3/5/2008 10:12:21 AM   
  ebgreen


Posts: 4971
Score: 31
Joined: 7/12/2005
Status: offline
There are samples of unzipping in the thread I linked. For examples of the rest here are some search terms that might help:

FileSystemObject
.Files
InStr

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to cmontr)
 
 
Post #: 6
 
 RE: zip search script help - 3/5/2008 10:24:58 AM   
  cmontr

 

Posts: 4
Score: 0
Joined: 3/5/2008
Status: offline
Thnx - I will search and see what I can do...I will let you know later tomorrow...I appreciate.

(in reply to ebgreen)
 
 
Post #: 7
 
 RE: zip search script help - 3/5/2008 1:43:55 PM   
  dm_4ever


Posts: 2641
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
http://www.visualbasicscript.com/m_53086/tm.htm

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to cmontr)
 
 
Post #: 8
 
 RE: zip search script help - 3/6/2008 1:49:50 AM   
  ebgreen


Posts: 4971
Score: 31
Joined: 7/12/2005
Status: offline
Thanks DM. I didn't even see that I forgot to include the link. Ooops...

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to dm_4ever)
 
 
Post #: 9
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> zip search script help Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts