开发者

how to copy files in asp.net [closed]

开发者 https://www.devze.com 2023-02-14 02:05 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
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

精彩评论

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