开发者

how to copy files in asp.net [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_高级运维 Closed 10 years ago.

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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜