Sign in with
Sign up | Sign in
Your question

Windows 7 xcopy to terserver

Tags:
Last response: in Windows 7
Share
October 17, 2011 2:33:49 PM

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
October 17, 2011 2:43:50 PM

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.
!