| |
sd41
Posts: 3
Score: 0
Joined: 7/17/2008
Status: offline
|
Imports System Imports System.IO Imports System.Text Public Class Test Public Shared Sub Main() Dim path As String = "c:\temp\MyTest.txt" Try Dim sw As StreamWriter = File.CreateText(path) sw.Close() Dim path2 As String = path + "temp" ' Ensure that the target does not exist. File.Delete(path2) ' Copy the file. File.Copy(path, path2) Console.WriteLine("{0} was copied to {1}.", path, path2) ' Delete the newly created file. File.Delete(path2) Console.WriteLine("{0} was successfully deleted.", path2) Catch e As Exception Console.WriteLine("The process failed: {0}", e.ToString()) End Try End Sub End Class line 5 char 8 error: expected identifier code: 800a03f2 thanks,
|
|