New
#41
Paul,
My suggestion is that, if you want to prefix them with date-time, you will need a For loop sending
- each identified folder to a subroutine where it can be sent to its destination individually but not renamed.
- each identified file to a subroutine where it can be sent to its destination individually then renamed individually.
I never use RoboCopy this way but it can be done.
- You would still get a major benefit of RoboCopy in that creation dates & times would be preserved in the copies. If creation dates & times are not important to you then you might just as well use XCopy.
- Doing it your way would allow accumulating backups and I imagine that is why you want to do it.
Doing it my way suits that part of my file backup plan.
- Hourly backup of all my own files within my Documents folder [and a few other select items] to a MicroSD card that lives in my computer, fits in an adapter on my keyring and can then be connected to my phone if I really needed to do so.
- Weekly backup to alternate external HDDs. Whilst each RoboCopy command is a /MIRror, the use of two xHDDs means I deliberately have a slight accumulation of differing backups at any one time as well as the protection of dual-backups [I also alternate my system images between them and use a highly contorted WinZip routine to create and backup a differential backup of only those Documents etc files of mine that have changed since the last backup].
- Ad hoc backup to my other computers. Both as a backup and to allow my computers to be used interchangeably - one computer is a tablet-with-keyboard that I use if I'm away.
RoboCopy has built-in Help just like other commands do RoboCopy /?
RoboCopy - MSDocs
Robocopy - SS64
I cannot find the TenForums thread where I posted details but I have also experimented with threading [the /MT:1 switch]. You can speed up backups to many destinations by using, just for example, /MT:32 but can only find out what works in any given set of circumstances by trying different values to see what works.
- In some of my Robopy copy scripts, I check Robocopy Exit Codes - SS64 and repeat the command at a lower /MT: value if there has been a problem. So I only end up at /MT:1 for awkward destinations such as my tablet.
Denis