Showing posts with label backup. Show all posts
Showing posts with label backup. Show all posts

Thursday, 20 October 2011

how to copy only new files with batch file?

xcopy *.docx ..\backupdoc /d /y
with other words, you may sync files by this command line. This that you cannot do is to delete files doesn't exist on source.

Sunday, 9 January 2011

use winrar for incremental backup

the follow little script may save you a lot of work, as it backups each time the files are under of the directory where is it, in different file names (according the date and the time of backup)

create a batch file called backup.bat, and drop these 2 lines:
@if not exist backups md backupincremental
@c:\progra~1\winrar\winrar a backupincremental\mybackup_%1_ -ag -r -dh -m5 -xbackupincremental 

progra~1 ?if you have win64 system, the winrar might me installed in c:\progra~2\... and not in c:\progra~1\..., so edit respectively.

syntax
        backup <description (without spaces) (optional)?
usage
        backup.bat before_destruction
file created:
       backupincremental\mybackup_before_destruction_20110109220848.rar