how to copy file from one location to another location using asp.net
In C#: File.Copy(srcpath, destpath2);
Try this code.....
imports System.io
Public Shared Sub CopyFlashScriptFile(ByVal SourceDirectory As String, ByVal DestinationDirectory As String)
Try
Dim f() As String = Directory.GetFiles(SourceDirectory)
For i As Integer = 0 To UBound(f)
File.Copy(f(i), DestinationDirectory & "\" & fileNameWithoutThePath(f(i)))
Next
Catch ex As Exception
End Try
End Sub
It depends. You could actually read the file from one location and write it to another:
https://web.archive.org/web/20211020145952/https://www.4guysfromrolla.com/articles/072303-1.aspx
With the correct permissions, you could delete the source file when the write is complete...
精彩评论