'fromDir is the source folder and toDir is dest folder
Dim f() As String = Directory.GetFiles(fromDir)
For i As Integer = 0 To UBound(f)
File.copy(f(i), toDir & "\" & fileNameWithoutThePath(f(i)))
Next
'********************
Public Function fileNameWithoutThePath(ByVal b As String) As String
Dim j As Int16
j = Convert.ToInt16(b.LastIndexOf("\"))
Return b.Substring(j + 1)
End Function
'********************
"Frank" wrote:
I'm using VB .NET and I'm finding that CopyTo will not help me copy all the
files in one directory to antoher directory at one time. Which command (if
that's the word) do I use to copy ALL the files at one to another directory?
--
Thanks (Novice)