Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Support Script Robocopy

Reply
Thread Tools Display Modes

Support Script Robocopy

 
 
Miguel
Guest
Posts: n/a

 
      09-15-2009
Hi!.
I have a script with robocopy as follows:
robocopy.exe source destination /MIR /SEC /CopyAll /V /TEE /B /MAXAGE:1 /W:5
/R:1

running at 00.01h and copy the modified files to another folder, then run
the wzzip.exe and taking them to another location via FTP.

Now I have to perform the same operation, but at 20.00h, and I need a
different folder, ONLY 0.00-20.00 modified files from the same day.

As I do?

 
Reply With Quote
 
 
 
 
Pegasus [MVP]
Guest
Posts: n/a

 
      09-15-2009

"Miguel" <> wrote in message
news:...
> Hi!.
> I have a script with robocopy as follows:
> robocopy.exe source destination /MIR /SEC /CopyAll /V /TEE /B /MAXAGE:1
> /W:5 /R:1
>
> running at 00.01h and copy the modified files to another folder, then run
> the wzzip.exe and taking them to another location via FTP.
>
> Now I have to perform the same operation, but at 20.00h, and I need a
> different folder, ONLY 0.00-20.00 modified files from the same day.
>
> As I do?
>


Use the /maxage:1 switch.


 
Reply With Quote
 
Miguel
Guest
Posts: n/a

 
      09-16-2009
But this option brings the modified files also the day before.
What I need is for example.

Day: 16-09-2009.
ONLY synchronize files to other folder modified 16-09-2009 day from 00.00
until at 20.00h


"Pegasus [MVP]" <> escribió en el mensaje de noticias
news:...
>
> "Miguel" <> wrote in message
> news:...
>> Hi!.
>> I have a script with robocopy as follows:
>> robocopy.exe source destination /MIR /SEC /CopyAll /V /TEE /B /MAXAGE:1
>> /W:5 /R:1
>>
>> running at 00.01h and copy the modified files to another folder, then run
>> the wzzip.exe and taking them to another location via FTP.
>>
>> Now I have to perform the same operation, but at 20.00h, and I need a
>> different folder, ONLY 0.00-20.00 modified files from the same day.
>>
>> As I do?
>>

>
> Use the /maxage:1 switch.
>


 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      09-16-2009
Below is the full log of the test I ran before I posted my reply:

Directory of D:\Tue
Tue 15/09/2009 09:45 108 sub.txt
Wed 16/09/2009 09:44 2,275 set.txt

robocopy d:\tue d:\tue1 *.* /maxage:1

Directory of D:\Tue1
Wed 16/09/2009 09:44 2,275 set.txt

I suggest you run a similar test, then post the result here in support of
your claim.


"Miguel" <> wrote in message
news:755028D2-7E0A-42F0-91A1-...
> But this option brings the modified files also the day before.
> What I need is for example.
>
> Day: 16-09-2009.
> ONLY synchronize files to other folder modified 16-09-2009 day from 00.00
> until at 20.00h
>
>
> "Pegasus [MVP]" <> escribió en el mensaje de noticias
> news:...
>>
>> "Miguel" <> wrote in message
>> news:...
>>> Hi!.
>>> I have a script with robocopy as follows:
>>> robocopy.exe source destination /MIR /SEC /CopyAll /V /TEE /B /MAXAGE:1
>>> /W:5 /R:1
>>>
>>> running at 00.01h and copy the modified files to another folder, then
>>> run the wzzip.exe and taking them to another location via FTP.
>>>
>>> Now I have to perform the same operation, but at 20.00h, and I need a
>>> different folder, ONLY 0.00-20.00 modified files from the same day.
>>>
>>> As I do?
>>>

>>
>> Use the /maxage:1 switch.
>>

>



 
Reply With Quote
 
Miguel
Guest
Posts: n/a

 
      09-16-2009
Directory: Source
bus.xml 14/09/2009 09.00
street.xml 15/09/2009 15:00
car.xml 16/09/2009 11:00

Directory: Destination
street.xml 15/09/2009 15:00
car.xml 16/09/2009 11:00

robocopy Source Destination *.* /e /W:5 /R:1 /MAXAGE:1 --> executed to:
16/09/2009 12:00


"Pegasus [MVP]" <> escribió en el mensaje de noticias
news:%...
> Below is the full log of the test I ran before I posted my reply:
>
> Directory of D:\Tue
> Tue 15/09/2009 09:45 108 sub.txt
> Wed 16/09/2009 09:44 2,275 set.txt
>
> robocopy d:\tue d:\tue1 *.* /maxage:1
>
> Directory of D:\Tue1
> Wed 16/09/2009 09:44 2,275 set.txt
>
> I suggest you run a similar test, then post the result here in support of
> your claim.
>
>
> "Miguel" <> wrote in message
> news:755028D2-7E0A-42F0-91A1-...
>> But this option brings the modified files also the day before.
>> What I need is for example.
>>
>> Day: 16-09-2009.
>> ONLY synchronize files to other folder modified 16-09-2009 day from 00.00
>> until at 20.00h
>>
>>
>> "Pegasus [MVP]" <> escribió en el mensaje de noticias
>> news:...
>>>
>>> "Miguel" <> wrote in message
>>> news:...
>>>> Hi!.
>>>> I have a script with robocopy as follows:
>>>> robocopy.exe source destination /MIR /SEC /CopyAll /V /TEE /B /MAXAGE:1
>>>> /W:5 /R:1
>>>>
>>>> running at 00.01h and copy the modified files to another folder, then
>>>> run the wzzip.exe and taking them to another location via FTP.
>>>>
>>>> Now I have to perform the same operation, but at 20.00h, and I need a
>>>> different folder, ONLY 0.00-20.00 modified files from the same day.
>>>>
>>>> As I do?
>>>>
>>>
>>> Use the /maxage:1 switch.
>>>

>>

>
>


 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      09-16-2009

Perhaps we use different versions of robocopy. Here are the details of my
copy:
---------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows :: Version XP010
---------------------------------------------------------------------


"Miguel" <> wrote in message
news:4DC5EC4F-0DD3-4158-AF27-...
> Directory: Source
> bus.xml 14/09/2009 09.00
> street.xml 15/09/2009 15:00
> car.xml 16/09/2009 11:00
>
> Directory: Destination
> street.xml 15/09/2009 15:00
> car.xml 16/09/2009 11:00
>
> robocopy Source Destination *.* /e /W:5 /R:1 /MAXAGE:1 --> executed to:
> 16/09/2009 12:00
>
>
> "Pegasus [MVP]" <> escribió en el mensaje de noticias
> news:%...
>> Below is the full log of the test I ran before I posted my reply:
>>
>> Directory of D:\Tue
>> Tue 15/09/2009 09:45 108 sub.txt
>> Wed 16/09/2009 09:44 2,275 set.txt
>>
>> robocopy d:\tue d:\tue1 *.* /maxage:1
>>
>> Directory of D:\Tue1
>> Wed 16/09/2009 09:44 2,275 set.txt
>>
>> I suggest you run a similar test, then post the result here in support of
>> your claim.
>>
>>
>> "Miguel" <> wrote in message
>> news:755028D2-7E0A-42F0-91A1-...
>>> But this option brings the modified files also the day before.
>>> What I need is for example.
>>>
>>> Day: 16-09-2009.
>>> ONLY synchronize files to other folder modified 16-09-2009 day from
>>> 00.00 until at 20.00h
>>>
>>>
>>> "Pegasus [MVP]" <> escribió en el mensaje de noticias
>>> news:...
>>>>
>>>> "Miguel" <> wrote in message
>>>> news:...
>>>>> Hi!.
>>>>> I have a script with robocopy as follows:
>>>>> robocopy.exe source destination /MIR /SEC /CopyAll /V /TEE /B
>>>>> /MAXAGE:1 /W:5 /R:1
>>>>>
>>>>> running at 00.01h and copy the modified files to another folder, then
>>>>> run the wzzip.exe and taking them to another location via FTP.
>>>>>
>>>>> Now I have to perform the same operation, but at 20.00h, and I need a
>>>>> different folder, ONLY 0.00-20.00 modified files from the same day.
>>>>>
>>>>> As I do?
>>>>>
>>>>
>>>> Use the /maxage:1 switch.
>>>>
>>>

>>
>>

>



 
Reply With Quote
 
Miguel
Guest
Posts: n/a

 
      09-16-2009

-----------------------------------------------------------------------------
ROBOCOPY :: Robust File Copy for Windows :: Version XP010
-----------------------------------------------------------------------------

"Pegasus [MVP]" <> escribió en el mensaje de noticias
news:ei9%...
> Perhaps we use different versions of robocopy. Here are the details of my
> copy:
> ---------------------------------------------------------------------
> ROBOCOPY :: Robust File Copy for Windows :: Version XP010
> ---------------------------------------------------------------------
>
>
> "Miguel" <> wrote in message
> news:4DC5EC4F-0DD3-4158-AF27-...
>> Directory: Source
>> bus.xml 14/09/2009 09.00
>> street.xml 15/09/2009 15:00
>> car.xml 16/09/2009 11:00
>>
>> Directory: Destination
>> street.xml 15/09/2009 15:00
>> car.xml 16/09/2009 11:00
>>
>> robocopy Source Destination *.* /e /W:5 /R:1 /MAXAGE:1 --> executed to:
>> 16/09/2009 12:00
>>
>>
>> "Pegasus [MVP]" <> escribió en el mensaje de noticias
>> news:%...
>>> Below is the full log of the test I ran before I posted my reply:
>>>
>>> Directory of D:\Tue
>>> Tue 15/09/2009 09:45 108 sub.txt
>>> Wed 16/09/2009 09:44 2,275 set.txt
>>>
>>> robocopy d:\tue d:\tue1 *.* /maxage:1
>>>
>>> Directory of D:\Tue1
>>> Wed 16/09/2009 09:44 2,275 set.txt
>>>
>>> I suggest you run a similar test, then post the result here in support
>>> of your claim.
>>>
>>>
>>> "Miguel" <> wrote in message
>>> news:755028D2-7E0A-42F0-91A1-...
>>>> But this option brings the modified files also the day before.
>>>> What I need is for example.
>>>>
>>>> Day: 16-09-2009.
>>>> ONLY synchronize files to other folder modified 16-09-2009 day from
>>>> 00.00 until at 20.00h
>>>>
>>>>
>>>> "Pegasus [MVP]" <> escribió en el mensaje de noticias
>>>> news:...
>>>>>
>>>>> "Miguel" <> wrote in message
>>>>> news:...
>>>>>> Hi!.
>>>>>> I have a script with robocopy as follows:
>>>>>> robocopy.exe source destination /MIR /SEC /CopyAll /V /TEE /B
>>>>>> /MAXAGE:1 /W:5 /R:1
>>>>>>
>>>>>> running at 00.01h and copy the modified files to another folder, then
>>>>>> run the wzzip.exe and taking them to another location via FTP.
>>>>>>
>>>>>> Now I have to perform the same operation, but at 20.00h, and I need a
>>>>>> different folder, ONLY 0.00-20.00 modified files from the same day.
>>>>>>
>>>>>> As I do?
>>>>>>
>>>>>
>>>>> Use the /maxage:1 switch.
>>>>>
>>>>
>>>
>>>

>>

>
>


 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      09-16-2009
The only suggestion I can make is for you to examine your file dates in more
detail. On my machine the default appears to imply the /tw switch for the
"dir" command. Perhaps your machine uses /tc or /ta. This would explain the
discrepancy between robocopy.exe and the "dir" command.


"Miguel" <> wrote in message
news:2414631C-B8E1-4D82-BFE9-...
> -----------------------------------------------------------------------------
> ROBOCOPY :: Robust File Copy for Windows :: Version XP010
> -----------------------------------------------------------------------------
>
> "Pegasus [MVP]" <> escribió en el mensaje de noticias
> news:ei9%...
>> Perhaps we use different versions of robocopy. Here are the details of my
>> copy:
>> ---------------------------------------------------------------------
>> ROBOCOPY :: Robust File Copy for Windows :: Version XP010
>> ---------------------------------------------------------------------
>>
>>
>> "Miguel" <> wrote in message
>> news:4DC5EC4F-0DD3-4158-AF27-...
>>> Directory: Source
>>> bus.xml 14/09/2009 09.00
>>> street.xml 15/09/2009 15:00
>>> car.xml 16/09/2009 11:00
>>>
>>> Directory: Destination
>>> street.xml 15/09/2009 15:00
>>> car.xml 16/09/2009 11:00
>>>
>>> robocopy Source Destination *.* /e /W:5 /R:1 /MAXAGE:1 --> executed to:
>>> 16/09/2009 12:00
>>>
>>>
>>> "Pegasus [MVP]" <> escribió en el mensaje de noticias
>>> news:%...
>>>> Below is the full log of the test I ran before I posted my reply:
>>>>
>>>> Directory of D:\Tue
>>>> Tue 15/09/2009 09:45 108 sub.txt
>>>> Wed 16/09/2009 09:44 2,275 set.txt
>>>>
>>>> robocopy d:\tue d:\tue1 *.* /maxage:1
>>>>
>>>> Directory of D:\Tue1
>>>> Wed 16/09/2009 09:44 2,275 set.txt
>>>>
>>>> I suggest you run a similar test, then post the result here in support
>>>> of your claim.
>>>>
>>>>
>>>> "Miguel" <> wrote in message
>>>> news:755028D2-7E0A-42F0-91A1-...
>>>>> But this option brings the modified files also the day before.
>>>>> What I need is for example.
>>>>>
>>>>> Day: 16-09-2009.
>>>>> ONLY synchronize files to other folder modified 16-09-2009 day from
>>>>> 00.00 until at 20.00h
>>>>>
>>>>>
>>>>> "Pegasus [MVP]" <> escribió en el mensaje de
>>>>> noticias news:...
>>>>>>
>>>>>> "Miguel" <> wrote in message
>>>>>> news:...
>>>>>>> Hi!.
>>>>>>> I have a script with robocopy as follows:
>>>>>>> robocopy.exe source destination /MIR /SEC /CopyAll /V /TEE /B
>>>>>>> /MAXAGE:1 /W:5 /R:1
>>>>>>>
>>>>>>> running at 00.01h and copy the modified files to another folder,
>>>>>>> then run the wzzip.exe and taking them to another location via FTP.
>>>>>>>
>>>>>>> Now I have to perform the same operation, but at 20.00h, and I need
>>>>>>> a different folder, ONLY 0.00-20.00 modified files from the same
>>>>>>> day.
>>>>>>>
>>>>>>> As I do?
>>>>>>>
>>>>>>
>>>>>> Use the /maxage:1 switch.
>>>>>>
>>>>>
>>>>
>>>>
>>>

>>
>>

>



 
Reply With Quote
 
Miguel
Guest
Posts: n/a

 
      09-16-2009
DIR /TC and /TW

car.xml 16/09/2009 11:00

DIR /TA

street.xml 15/09/2009 15:00
car.xml 16/09/2009 11:00


"Pegasus [MVP]" <> wrote in message
news:%...
> The only suggestion I can make is for you to examine your file dates in
> more detail. On my machine the default appears to imply the /tw switch for
> the "dir" command. Perhaps your machine uses /tc or /ta. This would
> explain the discrepancy between robocopy.exe and the "dir" command.
>
>
> "Miguel" <> wrote in message
> news:2414631C-B8E1-4D82-BFE9-...
>> -----------------------------------------------------------------------------
>> ROBOCOPY :: Robust File Copy for Windows :: Version XP010
>> -----------------------------------------------------------------------------
>>
>> "Pegasus [MVP]" <> escribió en el mensaje de noticias
>> news:ei9%...
>>> Perhaps we use different versions of robocopy. Here are the details of
>>> my copy:
>>> ---------------------------------------------------------------------
>>> ROBOCOPY :: Robust File Copy for Windows :: Version XP010
>>> ---------------------------------------------------------------------
>>>
>>>
>>> "Miguel" <> wrote in message
>>> news:4DC5EC4F-0DD3-4158-AF27-...
>>>> Directory: Source
>>>> bus.xml 14/09/2009 09.00
>>>> street.xml 15/09/2009 15:00
>>>> car.xml 16/09/2009 11:00
>>>>
>>>> Directory: Destination
>>>> street.xml 15/09/2009 15:00
>>>> car.xml 16/09/2009 11:00
>>>>
>>>> robocopy Source Destination *.* /e /W:5 /R:1 /MAXAGE:1 --> executed to:
>>>> 16/09/2009 12:00
>>>>
>>>>
>>>> "Pegasus [MVP]" <> escribió en el mensaje de noticias
>>>> news:%...
>>>>> Below is the full log of the test I ran before I posted my reply:
>>>>>
>>>>> Directory of D:\Tue
>>>>> Tue 15/09/2009 09:45 108 sub.txt
>>>>> Wed 16/09/2009 09:44 2,275 set.txt
>>>>>
>>>>> robocopy d:\tue d:\tue1 *.* /maxage:1
>>>>>
>>>>> Directory of D:\Tue1
>>>>> Wed 16/09/2009 09:44 2,275 set.txt
>>>>>
>>>>> I suggest you run a similar test, then post the result here in support
>>>>> of your claim.
>>>>>
>>>>>
>>>>> "Miguel" <> wrote in message
>>>>> news:755028D2-7E0A-42F0-91A1-...
>>>>>> But this option brings the modified files also the day before.
>>>>>> What I need is for example.
>>>>>>
>>>>>> Day: 16-09-2009.
>>>>>> ONLY synchronize files to other folder modified 16-09-2009 day from
>>>>>> 00.00 until at 20.00h
>>>>>>
>>>>>>
>>>>>> "Pegasus [MVP]" <> escribió en el mensaje de
>>>>>> noticias news:...
>>>>>>>
>>>>>>> "Miguel" <> wrote in message
>>>>>>> news:...
>>>>>>>> Hi!.
>>>>>>>> I have a script with robocopy as follows:
>>>>>>>> robocopy.exe source destination /MIR /SEC /CopyAll /V /TEE /B
>>>>>>>> /MAXAGE:1 /W:5 /R:1
>>>>>>>>
>>>>>>>> running at 00.01h and copy the modified files to another folder,
>>>>>>>> then run the wzzip.exe and taking them to another location via FTP.
>>>>>>>>
>>>>>>>> Now I have to perform the same operation, but at 20.00h, and I need
>>>>>>>> a different folder, ONLY 0.00-20.00 modified files from the same
>>>>>>>> day.
>>>>>>>>
>>>>>>>> As I do?
>>>>>>>>
>>>>>>>
>>>>>>> Use the /maxage:1 switch.
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>

>>

>
>


 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a

 
      09-16-2009

As I said before, I have no further explanations for the difference in
behaviour of robocopy.exe. I can see these options for you:
a) Live with the problem.
b) Investigate robocopy.exe in more detail, e.g. by using different values
for the /maxage parameter and by running the command on different machines
with different operating systems and different files.
c) Write your own recursive VB Script code and make it date-sensitive.
d) Use a different copy tool, e.g. xcopy.exe or xxcopy.exe.


"Miguel" <> wrote in message
news:...
> DIR /TC and /TW
>
> car.xml 16/09/2009 11:00
>
> DIR /TA
>
> street.xml 15/09/2009 15:00
> car.xml 16/09/2009 11:00



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
support.microsoft.com - asp.net script error in IE7 William Buchanan Internet Explorer 2 02-06-2007 09:51 AM
Re: VB Script Support for VPC2004 and\or VPC 2007 Robert Comer Virtual PC 0 12-01-2006 04:16 PM
Visual Basic Script Support Pam Windows Update 2 03-01-2005 07:08 PM
Robocopy in script Marcus Windows Server 2 09-22-2004 12:10 PM
Media Guide : script error (Object does not support) on Audio (Video/Radio OK) Guy Claessens Windows Media Player 0 06-13-2004 04:39 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59