Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Installation / Documentation > Find and delete some specific files in Packaging & Deployment Wizard


Reply
 
Thread Tools Display Modes
  #1  
Old 11-13-2006, 12:45 AM
albertleng albertleng is offline
Regular
 
Join Date: Aug 2006
Posts: 79
Default Find and delete some specific files in Packaging & Deployment Wizard


Dear all,

How can i create an setup package which will find for some files in certain folders and then delete them? For eg, i want to find file1, file2 and file3 in
C:\FOLDER1\ and if they r found, delete them.

I have a software INNOSETUP but it's very demanding to learn the software's language and it consumes lots of time to do so.

Anybody knows easier way of doing this?

Thanks.

Albert
Reply With Quote
  #2  
Old 11-13-2006, 02:05 AM
Shurik12 Shurik12 is offline
Steppe Walker

Retired Moderator
* Expert *
 
Join Date: Jul 2002
Location: Ukraine/Russia/Belgium
Posts: 7,227
Default

Hi,

Just in case, do you realize that creating a setup package is a little bit more then just copying/deleting files in certain folders?


Shurik.
__________________
"A diaper is not like a computer that makes satisfying burbling noises from time to time, hinting at great inner complexity." Malcolm Gladwell

"I'm sitting here completely surrounded by no beer." Onslow, 'Keeping up appearances'
Reply With Quote
  #3  
Old 11-13-2006, 07:11 PM
albertleng albertleng is offline
Regular
 
Join Date: Aug 2006
Posts: 79
Default

Yes. Creating a setup package is a simple process but how to find and delete certain files in certain folders is another matter in which i dont want those files in that folder.
Reply With Quote
  #4  
Old 11-14-2006, 02:40 PM
ZaCkOX's Avatar
ZaCkOX ZaCkOX is offline
Contributor
 
Join Date: May 2006
Location: CA
Posts: 645
Default

Quote:
Originally Posted by albertleng
Yes. Creating a setup package is a simple process but how to find and delete certain files in certain folders is another matter in which i dont want those files in that folder.
Well if I assume your using vb 6 code still for the matter, try this:

Detect if file is somewhere...

Dim FirstDirectory As String

FirstDirectory = (Directory) 'Ex: "D:\Program Files\Stupid Folder\hi.exe"
If Dir(FirstDirectory) = "" Then
MsgBox "File Is Not There"
Else
MsgBox "File Is There"
'Kill (Directory) 'Ex: Kill ("D:\Program Files\Stupid Folder\hi.exe")
End If

If this doesn't help sorry, but I gave it a shot for ya Good Luck
__________________
ZaCkO ... Who is your attitude?
Reply With Quote
  #5  
Old 11-15-2006, 06:36 PM
albertleng albertleng is offline
Regular
 
Join Date: Aug 2006
Posts: 79
Default

Hello Zacko.

Thanks for your pointer. It works!

Quote:
Originally Posted by ZaCkOX
Well if I assume your using vb 6 code still for the matter, try this:

Detect if file is somewhere...

Dim FirstDirectory As String

FirstDirectory = (Directory) 'Ex: "D:\Program Files\Stupid Folder\hi.exe"
If Dir(FirstDirectory) = "" Then
MsgBox "File Is Not There"
Else
MsgBox "File Is There"
'Kill (Directory) 'Ex: Kill ("D:\Program Files\Stupid Folder\hi.exe")
End If

If this doesn't help sorry, but I gave it a shot for ya Good Luck
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->