dates in a batch file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
express
Posts: 6
Joined: 24 Aug 2010 03:25

dates in a batch file

#1 Post by express » 24 Aug 2010 05:34

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

orange_batch
Expert
Posts: 442
Joined: 01 Aug 2010 17:13
Location: Canadian Pacific
Contact:

Re: dates in a batch file

#2 Post by orange_batch » 24 Aug 2010 08:23


avery_larry
Expert
Posts: 391
Joined: 19 Mar 2009 08:47
Location: Iowa

Re: dates in a batch file

#3 Post by avery_larry » 25 Aug 2010 10:29

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.

orange_batch
Expert
Posts: 442
Joined: 01 Aug 2010 17:13
Location: Canadian Pacific
Contact:

Re: dates in a batch file

#4 Post by orange_batch » 25 Aug 2010 11:23

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.

express
Posts: 6
Joined: 24 Aug 2010 03:25

Re: dates in a batch file

#5 Post by express » 27 Aug 2010 03:26

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

Post Reply