Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Vb File Deletion


2 replies to this topic

#1 DarkCloud

    Newbie

  • Kontributors
  • Pip
  • 1 posts

Posted 28 July 2010 - 03:05 PM

Hello. I was wondering what is the code in VB for deleting a particular folder in a system when the created exe file is run. Any help will be appreciated. :lol:

#2 JorgeJ

    Newbie

  • Kontributors
  • Pip
  • 1 posts

Posted 01 September 2010 - 07:32 PM

View PostDarkCloud, on 28 July 2010 - 03:05 PM, said:

Hello. I was wondering what is the code in VB for deleting a particular folder in a system when the created exe file is run. Any help will be appreciated. :lol:
You can use:
Kill 'filename'

or you can set a reference to the Microsoft Scripting Runtime
and use it in your code as

Dim fso As FileSystemObject
Set fso = New FileSystemObject

#3 BubbaBeans

    Newbie [Level 1]

  • Kontributors
  • Pip
  • 11 posts
  • Gender:Male
  • Location:Redding, CA, USA

Posted 15 October 2010 - 07:17 PM

Depends on which version of vb you're using. I'm using visual studio 2010... when I delete a file I use

File.Delete(Path and name of file)

And it takes care of it.




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users