FileCopy error

  • Thread starter Thread starter anthony
  • Start date Start date
A

anthony

I have some code that runs from a button on a form, the purpose of
which is to copy a file into a folder. So, why does:

FileCopy strFile, strPath

give me "Path/file access error" when the value of strFile is "D:\data
\igdb\photos\all photos\20080314130700.jpg" and the value of strPath
is "D:\data\igdb\photos\all photos\2290"?

If I use xcopy in a command window using those exact same values, the
file copies
 
On Fri, 1 May 2009 07:36:25 -0700 (PDT), anthony

The destination must include a filename:
strPath = "D:\data\igdb\photos\all photos\2290\test.jpg"
FileCopy strFile, strPath

-Tom.
Microsoft Access MVP
 
Back
Top