#20823 - 2002-04-29 03:14 PM
XCOPY /D doesn't work :-(
|
orest
Lurker
Registered: 2002-04-29
Posts: 4
Loc: Lviv, Ukraine
|
XCOPY started from script with /D switch doesn't work -- it copies all files instead of newer only. The same command from .bat file runs pretty well. What's wrong?
_________________________
sy,
orest
|
|
Top
|
|
|
|
#20825 - 2002-04-29 03:19 PM
Re: XCOPY /D doesn't work :-(
|
orest
Lurker
Registered: 2002-04-29
Posts: 4
Loc: Lviv, Ukraine
|
It looks like this:
Shell "cmd xcopy /S /d \\someserver\someshare\somedir\*.*
C:\aaa\*.*"
_________________________
sy,
orest
|
|
Top
|
|
|
|
#20827 - 2002-04-29 03:44 PM
Re: XCOPY /D doesn't work :-(
|
orest
Lurker
Registered: 2002-04-29
Posts: 4
Loc: Lviv, Ukraine
|
dear Jochen
I do NOT need to specify date, date is optional -- please take a look at xcopy help: Copies files and directory trees.
XCOPY source [destination] ... [/D[:date]] ... /D:m-d-y ... If no date is given, copies only those files whose source time is newer than the destination time.
After all it works from command prompt and in batch file.
_________________________
sy,
orest
|
|
Top
|
|
|
|
#20830 - 2002-04-29 04:54 PM
Re: XCOPY /D doesn't work :-(
|
BrianTX
Korg Regular
Registered: 2002-04-01
Posts: 895
|
I just tried it in Windows 2000 with a simple
code:
shell "xcopy /S /d \\server\share\folder c:\temp"
It worked like a champ.. didn't need a CMD... With the CMD /C worked fine as well.
So, I can't duplicate the problem..
Brian
|
|
Top
|
|
|
|
#20831 - 2002-04-29 11:17 PM
Re: XCOPY /D doesn't work :-(
|
MCA
KiX Supporter
   
Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
|
Dear,
We have test your script. Following works in our situation:
code:
shell '%comspec% /c xcopy /d /s "\\someserver\someshare\somedir\*.*" "c:\aaa\"'
The big differences are - "%comspec%" instead of "CMD" - use "c:\aaa\" instead of "c:\aaa\*.*" greetings.
btw: we advise to use as additional XCOPY options /Y /C /R /I /H
|
|
Top
|
|
|
|
#20832 - 2002-04-30 09:51 AM
Re: XCOPY /D doesn't work :-(
|
orest
Lurker
Registered: 2002-04-29
Posts: 4
Loc: Lviv, Ukraine
|
Thanks to all involved in discussion. It works.
_________________________
sy,
orest
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 302 anonymous users online.
|
|
|