Visual Basic

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDesktop ProgrammingVisual Basic

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old October 14th, 2008, 08:53 AM
HandL HandL is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Posts: 1 HandL User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 13 sec
Reputation Power: 0
Look into a directory for a zip, delete, and repeat until directory is empty.

I have programmed a Module [linked to a button on the worksheet] that has the user manually select a .zip file, and analyzes the contents and subsequently deletes the original zipped file. The user would conduct this exercise until all zip files in one folder are empty.

What I don't know how to do is have it look in that folder as a default for any zip file; and sequentially conduct the module on each, until the folder is empty (it would become empty because the module deletes each one-by-one).

So the ultimate result is by pressing that button, the analysis on all files is done in the background.

Would anyone mind helping? I'm very limited in VB; This is my first project using it :-(.


-MG

Reply With Quote
  #2  
Old January 12th, 2010, 08:54 AM
Archit Archit is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Jan 2010
Posts: 2 Archit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 5 m 47 sec
Reputation Power: 0
may be this will help you
Dim cur As String
cur = System.Environment.CurrentDirectory.ToString ' gets current dir or if u want different dir u can write it
Dim str As String

Dim files As String() = Directory.GetFiles(cur, "*.zip")

For Each str In files
' loop which runs utill all zips are over
Next

Reply With Quote
Reply

Viewing: Tutorialized ForumsDesktop ProgrammingVisual Basic > Look into a directory for a zip, delete, and repeat until directory is empty.


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap