Page 1 of 1

dates in a batch file

Posted: 24 Aug 2010 05:34
by express
i have created a batch file to copy some users my documents to their home folder, however i only want it to copy documents that are of a newer date than the ones previously saved. is there an easy switch for this?

i know one or two users would be able to edit the batch file but the other 15 or so would not know where to start not should they need to.

basically they all do a lot of work at home locally on their laptops, but some of the work they do is business critical. therefore, i'd like to get it backed up to their home folders so it can then be included in the regular backups of our servers. They'll click on an icon and it will perform the task required.

thanks in advance.

HH

Re: dates in a batch file

Posted: 24 Aug 2010 08:23
by orange_batch

Re: dates in a batch file

Posted: 25 Aug 2010 10:29
by avery_larry
xcopy /d: ??

I think that should work -- if you can figure out the correct syntax. I strongly prefer robocopy--but you'd have to install it on workstations.

Re: dates in a batch file

Posted: 25 Aug 2010 11:23
by orange_batch
Ah yes, I must have been tired again because I read xcopy and that function of /d: somehow flew over my head, lol. If it does the job (which it does in this case) I would recommend that before robocopy due to it being preinstalled as well.

Re: dates in a batch file

Posted: 27 Aug 2010 03:26
by express
cheers guys, although i am using the /D/E as for some reason D: just makes the process go mental and just run forever.

i have anothe query but will have a wee search first as it is not quite as urgent as the last one. :D

H