Xcopy not working

S

SHIPP

I have the following code.

Call Shell("xcopy " & strFromArchive & "*.* " & strToArchive & "*.* /d",
vbHide)

It copies over files that do not exist in strToArchive but it does not
replace the files in strToArchive that are older than those being copied from
strFromArchive. And ideas would be appreciated. I am using Access 2003. Thank
you.
 
D

Dirk Goldgar

SHIPP said:
I have the following code.

Call Shell("xcopy " & strFromArchive & "*.* " & strToArchive & "*.* /d",
vbHide)

It copies over files that do not exist in strToArchive but it does not
replace the files in strToArchive that are older than those being copied
from
strFromArchive. And ideas would be appreciated. I am using Access 2003.
Thank
you.


Do you perhaps hgave to also specify the /Y flag to suppress the overwrite
prompt?

Call Shell("xcopy " & strFromArchive & "*.* " & strToArchive & "*.* /d
/y", vbHide
 
S

SHIPP

That did the trick.
--
M. Shipp


Dirk Goldgar said:
Do you perhaps hgave to also specify the /Y flag to suppress the overwrite
prompt?

Call Shell("xcopy " & strFromArchive & "*.* " & strToArchive & "*.* /d
/y", vbHide


--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 

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