You'll have to loop through the directory and copy the files one by one:
Dim SourceDir As String = "C\ABC"
Dim DestDir As String = "C:\XYZ"
Dim DestFile As String
For Each strFile As String In Directory.GetFiles(SourceDir, "*.txt")
DestFile = strFile.Replace(SourceDir, DestDir)
File.Copy(strFile, DestFile)
Next strFile
hope that helps..
Imran.
"Jul" <ju********@sympatico.ca> wrote in message
news:MS********************@news20.bellglobal.com. ..
File.Copy Method does not let use template for copying files,
I can not use File.Copy("C:\ABC\*.txt", "C:\XYZ\*.txt")
but I need to use such way:
File.Copy("C:\ABC\1.txt", "C:\XYZ\1.txt")
File.Copy("C:\ABC\2.txt", "C:\XYZ\2.txt")
Does exist way in .Net for copying file by template?