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)
 
Top