Jump to content
xisto Community
DarkCloud

Vb File Deletion

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.