Windows 7 xcopy to terserver

martyn_80

Distinguished
Oct 17, 2011
2
0
18,510
Hello,
using following bat file to back up windows 7 data to teraserver
net use a: \\harry\fred password > c:\log\errorlog
set /p response=<c:\log\errorlog
if not "%response:~22,12%"=="successfully" goto end
time /T > c:\log\fred.log
xcopy c:\fred a: /D /E /C /F /R /K /Y /Z > c:\log\fred.log
time /T > c:\log\fred.log
net use a: /delete > c:\log\errorlog
set /p response=<c:\log\errorlog
if not "%response:~15,12%"=="successfully" goto end
:end

copies files ok but copies all files not just new ones
 

delazaren

Distinguished
Oct 29, 2009
119
1
18,690
if you want to copy just new or modified files have a look at the Win7 built in command robocopy - this is the one I use to backup my files.