Quantcast
Viewing all articles
Browse latest Browse all 11372

.bat backups : copy files , if file exist rename it with modification date or current date

I want .bat file that copy files, and if files exist in the backup location,  but modified, copy the modified files but change name (add date to the name)

I want the file to backup also the new files.

any idea ?

i'm currently using .bat file like this : 

@echo off
:: variables
set drive=d:\Backup
set backupcmd=xcopy /s /c /d /e /h /i /r /y
SET dateNtime="%DATE%"

.......

so xcopy will copy modified files and write it over the old one in the backup, in here, for example if the employee have a word file, if he empty the file content, so backup will copy it over the old one in the backup, as well as the outlook file, this issue sometimes happening. I found this solution only with acrois backup.

any help to fix this?


Viewing all articles
Browse latest Browse all 11372

Trending Articles