FileCopy command error.... (1 Viewer)

cheer

Registered User.
Local time
Today, 18:28
Joined
Oct 30, 2009
Messages
222
I got the error "Path/File Access Error" when using below command

FileCopy strPDFFilePath, rsTemp2("PDFFilePath")

Any resolution or equivalent code ?
 

spikepl

Eledittingent Beliped
Local time
Today, 12:28
Joined
Nov 3, 2010
Messages
6,142
What makes you think there is anything wrong with the code? The thing says that your data suck. What is the content of those two strings? Is the file there? Is it closed?
 

jleach

Registered User.
Local time
Today, 06:28
Joined
Jan 4, 2012
Messages
308
What are the values of the variable and field? The FileCopy statement syntax is correct (FileCopy, Source, Destination), but if the contents of the variable and/or field is no good, you'll be getting errors.
 

boblarson

Smeghead
Local time
Today, 03:28
Joined
Jan 12, 2001
Messages
32,059
Remember, both need to have the full path and file extensions. I find that most people forget that when having problems using filecopy. So, like:

FileCopy "C:\Temp\MyFile.pdf", "C:\AnotherFolder\MyFile2.pdf"


usually one forgets either to include the full path or the file extension when problems of this sort pop up.
 

cheer

Registered User.
Local time
Today, 18:28
Joined
Oct 30, 2009
Messages
222
Thanks everyone here for the help. I manage to get this problem resolved after i notice something goes wrong to the PDF file.
 

Users who are viewing this thread

Top Bottom