CopyFile Method problem

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

I am trying to write code within access which will
transfer a variable number of word documents into an
archive folder. After looking at the help file I am using
the following code, but it doesn't work. Ay ideas?

FileSystemObject.CopyFile "D:\Data\Database\Reviews\*.doc",
"D:\Data\Database\Reviews\Archive\"
 
I would use this code snippet instead:

Dim strFile As String
strFile = Dir("D:\Data\Database\Reviews\*.doc")
Do While strFile <> ""
FileCopy "D:\Data\Database\Reviews\" & strFile, _
"D:\Data\Database\Reviews\Archive\" & strFile
strFile = Dir()
Loop
 
Back
Top