Random Stuff Forums
 

Go Back   Random Stuff Forums > Technical > Programming

Programming Discuss any type of programming here.

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 06-05-2007, 05:00 PM
World Domination's Avatar
(Offline)
Super Sexy Admin
 
Join Date: Jan 2007
Location: Illinois, USA
Posts: 7,448
World Domination is an unknown quantity at this point
Default [TUT] Deleting Files with Visual Basic

WARNING: The file you delete with this code it NOT restore able so do not delete anything you need.



In this tutorial I will show you how to delete a file, or multiple files, on your computer. This can be done is either Visual Basic 6 or 5, it is the same in both.

First you need to Open Visual basic. You will see a screen like this (Might be a tiny different if your using VB5):


Chose 'Standard EXE':


You will then get a screen that looks like this:


Double click inside the little box named 'Form1":


A Screen like this will then pop up:


In between Private Sub Form_Load() and end sub type Kill ("location of file you want to delete"):


Optional Step:
If you want to delete more then one file Just hit enter after the First Kill code and type it again but with the other file location you wish to delete:


Now that you have all the code written it's time to run it. If you do not know how to run it please read on further. If you do know how to run it, well go run it already!

Now this is simple all you have to do to run it is click the little blue start arrow on the standard tool bar:


If you correctly put int he location of the file you wanted to delete, and after hitting start this should pop up:


When that pops up just close it and go to where the file you deleted was and it will not be there anymore.

WARNING: The file you delete with this code it NOT restore able so do not delete anything you need.


__________________
RSForums.org - We Don't give a fuck.
RSForums.org - Worse than Crack.
RSForums.org - Where the criminals hang.
RSForums.org - Will never die.


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

"It's not yelling, it's projecting; and by the way, my voice is soothing."
-Billy Mays


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Why does have to MSN? Too secreto for the forums? If you don't want people to find out about something, post it at RSF.
Reply With Quote
  #2  
Old 06-05-2007, 05:02 PM
Zypur (Offline)
Guru
 
Join Date: Jan 2007
Posts: 3,857
Zypur is an unknown quantity at this point
Default

Nice guide. Never knew that you know VB.
__________________
"I can only show you the door, but you must walk through it."

<Reece>"Lol teh d00r, u need 2 go thru it k, n u betta cuz im a mod, k?"

A.K.A.Stefan!
Reply With Quote
  #3  
Old 06-05-2007, 05:03 PM
World Domination's Avatar
(Offline)
Super Sexy Admin
 
Join Date: Jan 2007
Location: Illinois, USA
Posts: 7,448
World Domination is an unknown quantity at this point
Default

I don't know much, just a little. I've been messing with it a lot lately because I am taking Visual basic class next year and I want to be ahead of some of the people in the class.
__________________
RSForums.org - We Don't give a fuck.
RSForums.org - Worse than Crack.
RSForums.org - Where the criminals hang.
RSForums.org - Will never die.


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

"It's not yelling, it's projecting; and by the way, my voice is soothing."
-Billy Mays


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Why does have to MSN? Too secreto for the forums? If you don't want people to find out about something, post it at RSF.
Reply With Quote
  #4  
Old 06-05-2007, 07:02 PM
Chickenultra (Offline)
Yar... PIRATE!
 
Join Date: Feb 2007
Posts: 2,100
Chickenultra is an unknown quantity at this point
Default

Nice, but isn't this the same function as shift+delete?
Reply With Quote
  #5  
Old 07-05-2007, 11:32 AM
BANNED
 
Join Date: Jan 2007
Location: Andrew Gower's nightmares.
Posts: 1,276
ilikegrapesoda72 is an unknown quantity at this point
Default

Mwahaha, now I can make an internet worm to rule the internet and C:/ drives...
Reply With Quote
  #6  
Old 07-05-2007, 12:11 PM
World Domination's Avatar
(Offline)
Super Sexy Admin
 
Join Date: Jan 2007
Location: Illinois, USA
Posts: 7,448
World Domination is an unknown quantity at this point
Default

I did this at school and deleted some System files off of my teachers computer.
__________________
RSForums.org - We Don't give a fuck.
RSForums.org - Worse than Crack.
RSForums.org - Where the criminals hang.
RSForums.org - Will never die.


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

"It's not yelling, it's projecting; and by the way, my voice is soothing."
-Billy Mays


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
Why does have to MSN? Too secreto for the forums? If you don't want people to find out about something, post it at RSF.
Reply With Quote
  #7  
Old 17-08-2007, 08:13 PM
Blupig's Avatar
Blupig (Offline)
wat i don't even
 
Join Date: Aug 2007
Posts: 156
Blupig is an unknown quantity at this point
Default

This is a code I made from your idea to make this application more complex, making it so the user can define the file they want to delete.

Private Sub Command1_Click()

Kill Text1.Text

End Sub
It's actually more simple. Anyways, I compiled a small source code of it, check it out:
Attached Files
File Type: zip File Deleter.zip (1.1 KB, 3 views)
__________________
Spark a match and light the flame, come sit down and play a game. Before you sit, you should know, you've lost the game, you dirty ho.

Last edited by Blupig; 17-08-2007 at 09:44 PM..
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 09:09 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright © 2006 - 2012, Rsforums.org