This Code has Some Basic File handling Codes Which may help You Guys
Private Sub DirectoryCreate(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Directory.CreateDirectory("c:\" & InputBox("Enter Name of Folder You want to Create")) End Sub
Private Sub CreateFile(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click File.Create("c:\" & InputBox("Enter Name of File you want to create")) End Sub
Private Sub CopyFile(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Try Dim op As New OpenFileDialog op.Filter = "All Files|*.*" If op.ShowDialog() = Windows.Forms.DialogResult.OK Then Dim sa As New SaveFileDialog sa.FileName = "Copy of " & op.FileName.Remove(0, op.FileName.LastIndexOf("\") + 1) sa.Filter = "All Files|*.*" If sa.ShowDialog() = Windows.Forms.DialogResult.OK Then File.Copy(op.FileName, sa.FileName) End If End If Catch ex As Exception MsgBox(ex.ToString, MsgBoxStyle.Information, "Error") End Try End Sub
Download Same For Demo.
================================================================================ Regards Hefin Dsouza
AttachmentsDownload Sample (20775-8540-IOFunctions.rar)
|
No responses found. Be the first to respond and make money from revenue sharing program.
|