Xcopy not working

  • Thread starter Thread starter SHIPP
  • Start date Start date
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.
 
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
 
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)
 
Back
Top