|Batch File to copy and paste folder contents incrementally?|
I thought this would be easier :/
I just want to copy one folder with contents to another incrementally using a bat file.
I lack sleep and patience, could anyone help before I kill the fucking internet.
read 178 times
3/3/2017 4:58:55 PM (last edit: 3/3/2017 4:58:55 PM)
...you're all useless.
read 153 times
3/5/2017 2:05:30 AM (last edit: 3/5/2017 2:05:30 AM)
What do you mean by incrementally.. That normally signifies changes since last backup, but why put that in a new folder ?
If you just want each backup to create a new folder, then just add %Date% to the name of the destination folder.
otherwise, robocopy /mir is the easiest way of creating a backup, that only copies changes since last backup.. It will not create a new destination folder by default though..
Terribly boring signature.
read 139 times
3/5/2017 10:10:10 AM (last edit: 3/5/2017 10:10:10 AM)
| Nik Clark
Does this page help?
read 138 times
3/5/2017 10:18:54 AM (last edit: 3/5/2017 10:18:54 AM)
No it makes things worse.
read 132 times
3/5/2017 4:50:19 PM (last edit: 3/5/2017 4:50:19 PM)
Guys thanks anyway, It's cool, I'll do it manually.
Searching for .bat solutions always go this way, I just want code I can easily manipulate by changing the appropriate parameters, a ready to go script where I just change folder names and paths without needing a phd in coding.
read 125 times
3/6/2017 3:17:09 AM (last edit: 3/6/2017 3:17:09 AM)
Hold my beer...
Make sure your USB HDD is using drive letter [F:], or alternatively update the script. Simply make it [C:] if you want to use the internal HDD.
Create a file called "copystuff.cmd" or similar containing:
set mytimestamp=%mydate: =_%_%mytime:.=_%
set switches=/E /NP /NFL /tee /R:1 /W:1 /MIR /COPYALL
if not exist "%usb%" exit
if not exist "%dest%" md "%dest%"
"%robocopy%" "c:\folder1" "%dest%\folder1" %switches% /LOG:"%dest%\backup_folder1.log"
:: If you have more than one folder:
::"%robocopy%" "c:\folder2" "%dest%\folder2" %switches% /LOG:"%dest%\backup_folder2.log"
::"%robocopy%" "c:\folder3" "%dest%\folder3" %switches% /LOG:"%dest%\backup_folder3.log"
Simply use "set dest=%usb%\Backup\" if you don't want to auto-increment the destination folder name each time the script is run.
If you don't need to auto-increment destination folder names I strongly recommend simply using 'FreeFileSync' however:
read 98 times
3/9/2017 12:52:54 PM (last edit: 3/9/2017 1:47:56 PM)
Wow, I'll buy you a fecking keg of beer for this, it's perfect, simple and genius, I can use this for so many small backup tasks, I'm going to spread this like herpes, what credits do you want?
read 71 times
3/10/2017 4:45:18 AM (last edit: 3/10/2017 4:45:18 AM)