FileCopy Problem

  • Thread starter Douglas J. Steele
  • 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.
 
D

DS

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
 
S

Stuart McCall

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.
 
D

DS

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
 
P

Pieter Wijnen

Then it should be \BackOffice\c$\Data.mdb

But that share is usually restricted

Pieter
 

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