How to copy a file in VB.NET/ASP.NET
To copy a file use
System.IO.File.Copy(FileToCopy, NewCopy)
Note
The NewCopy must include the filename and the file will not be overwritten if it already exists any errors are returned as exceptions
to copy and overwrite use the
System.IO.File.Copy(FileToCopy, NewCopy, Overwrite)
form of the method
There is more information from the Microsoft site at http://msdn.microsoft.com/en-us/library/system.io.file.copy.aspx
System.IO.File.Copy(FileToCopy, NewCopy)
Note
The NewCopy must include the filename and the file will not be overwritten if it already exists any errors are returned as exceptions
to copy and overwrite use the
System.IO.File.Copy(FileToCopy, NewCopy, Overwrite)
form of the method
There is more information from the Microsoft site at http://msdn.microsoft.com/en-us/library/system.io.file.copy.aspx
| < Prev | Next > |
|---|
