FileCopy error

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
 
T

Tom van Stiphout

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top