hi
I am working in asp.net,vb.net
I have to copy all files from 1 folder to another folder through coding using system.io
the files in the new folder should remain with the same name
how to do this.
--------------------------------------------------------------------------------
Here is VB 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