how do i edit or delete computer files

tahu191

Well-known member
Joined
Oct 27, 2005
Messages
48
Location
USA
Programming Experience
Beginner
i need to know how to either edit/move or delete files in the computer
 
Well,for deleting file this code will do the job: :cool:

First turn on Imports System.IO

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim F As File
Dim D As Directory
Dim S() As String

D.GetFiles("c:\")
F.Delete("c:\Test.txt")
End Sub

Also try this link: http://www.homeandlearn.co.uk/NET/nets8p7.html
there you have moving,deleting,copying file and everything else.Cheers :)
 
system.io.file.delete() will delete a file
system.io.file.move() will move a file

as for editing a file, that depends on what type of file it is, for text files you can use
system.io.streamreader() for reading and
system.io.streamwriter() for writing
 
Back
Top