FileCopy Problem

  • Thread starter Thread starter Douglas J. Steele
  • Start date Start date
D

Douglas J. Steele

Several things appear to be incorrect.

First, FileCopy doesn't accept parentheses.

Second, \\Backoffice\Data.mdb isn't a valid UNC (you're missing either the
server name or the share name)

Third, you need a complete file for the destination, not just a folder name.
 
I'm using this to copy a file...but it keeps turning red.

FileCopy ('\\Backoffice\Data.mdb', '\\Backoffice\Trash')

I'm copying Data.mdb to the Trash folder.
Gotta be the syntax.
Thanks
DS
 
DS said:
I'm using this to copy a file...but it keeps turning red.

FileCopy ('\\Backoffice\Data.mdb', '\\Backoffice\Trash')

I'm copying Data.mdb to the Trash folder.
Gotta be the syntax.
Thanks
DS

In addition to Doug's sound advice, you need to use double-quotes to
delineate strings. IOW the line should read (incorporating Doug's changes) :

FileCopy "\\ServerName\ShareName\Data.mdb", "\\ServerName\Trash\Data.mdb"

Substitute your actual server & share names of course.
 
Douglas said:
Several things appear to be incorrect.

First, FileCopy doesn't accept parentheses.

Second, \\Backoffice\Data.mdb isn't a valid UNC (you're missing either the
server name or the share name)

Third, you need a complete file for the destination, not just a folder name.
Thanks Doug,
The Server Name is Backoffice.
The file is on the root.
Is that OK?
Thanks
DS
 
Then it should be \BackOffice\c$\Data.mdb

But that share is usually restricted

Pieter
 
Back
Top