Solved

File Sync with Server in China

Posted on 2013-12-17
4
284 Views
Last Modified: 2014-02-18
Windows 2008 Server in China (Domain Controller)

Windows 2011 in LA  (Workgroup only)  Per china corp.

VPN from la to china....Attempting to sync files

Trying to Sync Files but China does not want local server to join domain to use DFS

So ******

I am looking for a sync Solution I can use to sync files....

Cjoego
0
Comment
Question by:Joseph Salazar
  • 3
4 Comments
 
LVL 15

Accepted Solution

by:
WalkaboutTigger earned 500 total points
ID: 39724765
Robocopy using the mirroring option

You can schedule the script listed below to run at a convenient hour.

If you want to change the running hours, change this line:

SET PARMS="\\%SourceServer%\%SourceShare%" "\\%DestinationServer%\%DestinationShare%" /MIR /R:1 /W:1 /NP /RH:2359-0600 /PF /ZB

Open in new window


The /RH:2359-0600 tells Robocopy it is only allowed to run from 1 minute before midnight until 6 am local time so that it doesn't interfere with normal business operations.


@echo off
REM -------------------------------------------------------------------------------
REM -------------------------------------------------------------------------------
REM -------------------------------------------------------------------------------
REM Purpose: Copies all necessary software, scripts and drivers needed to
REM assist in the support of staff workstations and laptops.  These files are
REM copied from a centralized source.  This script relies upon a local copy of
REM ROBOCOPY.EXE as well as BMAIL.EXE.  See end of document for parameter 
REM usage.
REM -------------------------------------------------------------------------------
REM -------------------------------------------------------------------------------
REM -------------------------------------------------------------------------------
REM Variables used in this script
REM -------------------------------------------------------------------------------
REM -------------------------------------------------------------------------------
REM 'Copier' is the name of the executable used to copy the source files to the
REM destination.  As of version 1.0, this is Robocopy.exe.
REM -------------------------------------------------------------------------------
REM 'Mailer' is the name of the executable used to send alert mails to the
REM Help Desk.  As of version 1.0, this is BMail.exe.
REM -------------------------------------------------------------------------------
REM 'SourceServer' is the DNS host name of the centralized server from where the
REM software, etc., will be copied from.
REM -------------------------------------------------------------------------------
REM 'SourceShare' is the share name on the source server.
REM -------------------------------------------------------------------------------
REM 'SMTPServer' is the name of the mail server to use for sending alert
REM e-mails.  This must be an internal mail host as most edge devices block
REM outbound SMTP traffic.
REM For AAC, the Exchange server must be configured to allow relaying from the
REM IP address of the BDP or mail alerts from the BDP will generate errors
REM at the Exchange server.
REM -------------------------------------------------------------------------------
REM 'SMTPTo' is the e-mail address to send alerts to.
REM -------------------------------------------------------------------------------
REM 'SMTPFrom' is the e-mail address to use for sent alerts.
REM -------------------------------------------------------------------------------
REM 'SMTPBody' is the alert e-mail message body.
REM -------------------------------------------------------------------------------
REM 'SMTPSubject' is the alert e-mail subject.
REM -------------------------------------------------------------------------------
REM 'LogFile' is the name of the logfile to send script and command output to.
REM This will have the year, month and day prepended to it within the script.
REM -------------------------------------------------------------------------------
REM 'LogDir' is the directory to write the log to.
REM -------------------------------------------------------------------------------
REM 'CMMD' is used to assemble command lines for execution.
REM -------------------------------------------------------------------------------
REM 'PARMS' is used to assemble parameters for calling an external command.
REM Normally an instantiation of an external command will look something like
REM
REM %CMMD% %PARMS%
REM -------------------------------------------------------------------------------
REM 'BinPath' is the full path to the ROBOCOPY.EXE and BMAIL.EXE commands.
REM -------------------------------------------------------------------------------
REM 'Today' is the local date for the day the Date routine is called. This
REM routine may appear in several locations throughout the script in the event
REM an updated time stamp is needed, such as when sending e-mails or logging
REM events in the event log.
REM The Date routine uses the variables 'year', 'month' and 'day' to capture
REM the 4-digit year, the 2-digit month and 2-digit day from the DATE /T
REM command and destroys these variables before returning to script execution.
REM -------------------------------------------------------------------------------
REM 'Now' is the local time when the Time routine is called.  This routine
REM may appear in several locations throughout the script in the event an
REM updated time stamp is needed, such as when sending e-mails or logging
REM events in the event log.
REM The Time routine uses variables 'TTHours', 'TTMinutes' and 'TTSecond' to
REM capture the hours, minutes and seconds from a text file and destroys these
REM variables before returning to script execution
REM -------------------------------------------------------------------------------


:VARIABLESET
Echo Setting variables
REM -------------------------------------------------------------------------------
REM This section contains all 'static' variables used to control program
REM execution and enables command processor extensions.
REM -------------------------------------------------------------------------------
SETLOCAL ENABLEEXTENSIONS
SET Copier=Robocopy.exe
SET Mailer=BMail.exe
SET SourceServer=<SET THIS TO YOUR CHINA SERVER NAME>
SET SourceShare=<SET THIS TO THE CHINA SERVER'S SHARE NAME>
SET DestinationServer=%Computername%
SET DestinationShare=<NAME OF DESTINATION SHARE ON LA SERVER>
SET SMTPServer=<EMAIL SERVER NAME FOR ERROR AND LOG MESSAGES>
SET SMTPTo=<RECIPIENT EMAIL ADDRESS FOR LOGS>
SET SMTPFrom=%COMPUTERNAME%@<ENTER YOUR EMAIL DOMAIN HERE>
REM SMTPSubject is set in the Cleanup module
SET LogFile=BDPCOPY.log
SET LogDir=C:\Robocopy
SET BinPath=C:\Robocopy
REM -------------------------------------------------------------------------------


:START
Set Caller=START
Set NextStep=CopyCMD
IF NOT EXIST %LogDir% MKDIR %LogDir%
IF NOT EXIST %BinPath%\%Copier% GOTO NOBIN
GOTO DATETIME


:CopyCMD
Echo Performing copy
SET LogFile=%LogDir%\%Today%%LogFile%
SET CMMD=%BinPath%\%Copier%
REM For Robocopy:
REM
REM     /MIR will mirror the source to the destination.
REM     /R:1 sets the number of retries on error to 1.
REM     /W:1 sets the number of seconds to wait between retries to 1 second.
REM     /NP sets Robocopy to not display a percentage complete progress
REM     /RH sets the acceptable time range that Robocopy can run
REM     /PF tells Robocopy to check the values set with /RH on a per-file basis as opposed to a per-session basis
REM     /ZB sets the copy in restartable mode and, in the event of an access denied error, to use backup mode

SET PARMS="\\%SourceServer%\%SourceShare%" "\\%DestinationServer%\%DestinationShare%" /MIR /R:1 /W:1 /NP /RH:2359-0600 /PF /ZB
SET ERRORLEVEL=
%CMMD% %PARMS% >> %LogFile% 2>>%LogDir%\Errorlog.log
SET CopyError=%ERRORLEVEL%
Echo Copy Error is %CopyError%
GOTO CEHANDLER


GOTO END
:DATETIME
Echo Calculating date and time
REM Setup variables for TIME and DATE to incorporate into the log file if DEBUG variable is set.
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set year=%%c
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set month=%%a
for /f "tokens=2-4 delims=/ " %%a in ('date /T') do set day=%%b
set Today=%year%%month%%day%
set year=
set month=
set day=

REM Unfortunately, the TIME /T command does not provide us with the
REM clock's seconds counter.  For that, we need to create a temporary file
REM and parse that file, using spaces, colons and periods as delimeters.
REM We're only interested in the whole seconds number so we ignore
REM everything after the period in the line, which is why we use the perion
REM as a delimeter in the first place.

VER | TIME > TEMPTIME.TXT
for /f "tokens=5 delims=:. " %%a in (TempTime.txt) do set TTHours=%%a
for /f "tokens=6 delims=:. " %%a in (TempTime.txt) do set TTMinutes=%%a
for /f "tokens=7 delims=:. " %%a in (TempTime.txt) do set TTSeconds=%%a

SET Now=%TTHours%%TTMinutes%%TTSeconds%
DEL TEMPTIME.TXT
set TTHours=
set TTMinutes=
set TTSeconds=
GOTO %NextStep%


GOTO END
:NOBIN
Echo Directory %BinPath% missing
echo The directory, %BinPath%, does not exist. >> %LogFile%
echo The script cannot find necessary components to correctly execute. >> %LogFile%
echo Please insure you have used the PREPBDP.BAT script prior to running this >> %LogFile%
echo script. >> %LogFile%
echo. >> %LogFile%
echo. >> %LogFile%
echo. >> %LogFile%
echo Script execution terminated. >> %LogFile%
GOTO Cleanup


:CEHANDLER
IF /I %COPYERROR% GTR 16 (
    SET NextStep=Cleanup
    GOTO CopyError99
)
SET Caller=CEHandler
GOTO CopyError%COPYERROR%
GOTO End


GOTO END
:CopyErrors
:CopyError99
Echo CopyError 99
SET MailPriority=URGENT-FATAL ERROR 99
echo. >> %LogFile%
echo A fatal error has occurred while executing %CMMD% %PARMS%  >> %LogFile%
echo Please check the log file for errors.  >> %LogFile%
echo Script execution has been terminated with error code %ErrorCode%. >> %LogFile%
echo This is an undefined error and should not have been possible. >> %LogFile%
echo Please check overall system, network and disk health. >> %LogFile%
echo The operation could not be completed successfully and was terminated. >> %LogFile%
echo Script failed at %Now% on %Today% due to copy error %CopyError%.
GOTO Cleanup

GOTO END
:CopyError16
Echo CopyError 16
REM     errorlevel 16 ***FATAL ERROR***
SET MailPriority=URGENT-FATAL ERROR %CopyError%
echo. >> %LogFile%
echo A fatal error has occurred while executing %CMMD% %PARMS%  >> %LogFile%
echo Please check the log file for errors.  >> %LogFile%
echo Script execution has been terminated with error code %ErrorCode%. >> %LogFile%
echo Robocopy did not copy any files. >> %LogFile%
echo Either a usage error or an error due to insufficient access privileges >> %LogFile%
echo on the source or destination directories. >> %LogFile%
echo Script failed at %Now% on %Today% due to copy error %CopyError%. >> %LogFile%
GOTO Cleanup

:CopyError15
Echo CopyError 15
REM CopyError15 is a combination of errors 8, 4, 2 and 1 and is considered an error
REM requiring administrative intervention
SET NextStep=CE15-2
GOTO CopyError8
:CE15-2
SET NextStep=CE15-3
GOTO CopyError4
:CE15-3
SET NextStep=CE15-4
GOTO CopyError2
:CE15-4
SET NextStep=CE15-5
GOTO CopyError5
:CE15-5
GOTO Cleanup


GOTO End
:CopyError14
Echo CopyError 14
REM CopyError14 is a combination of errors 8, 4, and 2 and is considered an error
REM requiring administrative intervention
SET NextStep=CE14-2
GOTO CopyError8
:CE14-2
SET NextStep=CE14-3
GOTO CopyError4
:CE14-3
SET NextStep=CE14-4
GOTO CopyError2
:CE14-4
GOTO Cleanup


GOTO End
:CopyError13
Echo CopyError 13
REM CopyError13 is a combination of errors 8, 4 and 1 and is considered an error
REM requiring administrative intervention
SET NextStep=CE13-2
GOTO CopyError8
:CE13-2
SET NextStep=CE13-3
GOTO CopyError4
:CE13-3
SET NextStep=CE13-4
GOTO CopyError1
:CE13-4
GOTO Cleanup


GOTO End
:CopyError12
Echo CopyError 12
REM CopyError12 is a combination of errors 8 and 4 and is considered an error
REM requiring administrative intervention
SET NextStep=CE12-2
GOTO CopyError8
:CE12-2
SET NextStep=CE12-3
GOTO CopyError4
:CE12-3
GOTO Cleanup


GOTO End
:CopyError11
Echo CopyError 11
REM CopyError11 is a combination of errors 8, 2 and 1 and is considered an error
REM requiring administrative intervention
SET NextStep=CE11-2
GOTO CopyError8
:CE11-2
SET NextStep=CE11-3
GOTO CopyError2
:CE11-3
SET NextStep=CE11-4
GOTO CopyError1
:CE11-4
GOTO Cleanup


GOTO End
:CopyError10
Echo CopyError 10
REM CopyError10 is a combination of errors 8 and 2 and is considered an error
REM requiring administrative intervention
SET NextStep=CE10-2
GOTO CopyError8
:CE10-2
SET NextStep=CE10-3
GOTO CopyError2
:CE10-3
GOTO Cleanup


GOTO End
:CopyError9
Echo CopyError 9
REM CopyError9 is a combination of errors 8 and 1 and is considered an error
REM requiring administrative intervention
SET NextStep=CE9-2
GOTO CopyError8
:CE9-2
SET NextStep=CE9-3
GOTO CopyError1
:CE9-3
GOTO Cleanup


GOTO END
:CopyError8
Echo CopyError 8
REM     errorlevel 8 FAIL
REM CopyError8  is considered an error requiring administrative intervention
IF %COPYERROR% EQU 8 SET NEXTSTEP=Cleanup
SET MailPriority=URGENT-FATAL ERROR
echo. >> %LogFile%
echo A fatal error has occurred while executing %CMMD% %PARMS%  >> %LogFile%
echo Please check the log file for errors.  >> %LogFile%
echo Script execution has been terminated with error code %ErrorCode%. >> %LogFile%
echo Some files or directories could not be copied (copy errors occurred  >> %LogFile%
echo and the retry limit was exceeded). >> %LogFile%
echo Check these errors further. >> %LogFile%
echo. >> %LogFile%
echo Script failed at %Now% on %Today% due to copy error %CopyError%. >> %LogFile%
echo. >> %LogFile%
GOTO %NextStep%


GOTO End
:CopyError7
Echo CopyError 7
REM CopyError7 is a combination of errors 4, 2 and 1 and is considered an error
REM requiring administrative intervention
SET MailPriority=URGENT-CRITICAL ERROR
SET NextStep=CE7-2
GOTO CopyError4
:CE7-2
SET NextStep=CE7-3
GOTO CopyError2
:CE7-3
SET NextStep=CE7-4
GOTO CopyError1
:CE7-4
GOTO Cleanup


GOTO End
:CopyError6
Echo CopyError 6
REM CopyError6 is a combination of errors 4 and 2 and is considered an error
REM requiring administrative intervention
SET MailPriority=URGENT-CRITICAL ERROR
SET NextStep=CE6-2
GOTO CopyError4
:CE6-2
SET NextStep=CE6-3
GOTO CopyError2
:CE6-3
GOTO Cleanup


GOTO End
:CopyError5
Echo CopyError 5
REM CopyError5 is a combination of errors 4 and 1 and is considered an error
REM requiring administrative intervention
SET MailPriority=URGENT-CRITICAL ERROR
SET NextStep=CE5-2
GOTO CopyError4
:CE5-2
SET NextStep=CE5-3
GOTO CopyError1
:CE5-3
GOTO Cleanup


GOTO END
:CopyError4
Echo CopyError 4
REM     errorlevel 4 MISMATCHES
IF %COPYERROR% EQU 4 SET NEXTSTEP=Cleanup
IF %COPYERROR% EQU 4 SET MailPriority=URGENT-CRITICAL ERROR
echo. >> %LogFile%
echo A warning has occurred while executing %CMMD% %PARMS%  >> %LogFile%
echo Some Mismatched files or directories were detected. >> %LogFile%
echo Examine the output log. Some housekeeping may be needed. >> %LogFile%
echo. >> %LogFile%
echo. >> %LogFile%
echo Script generated warning at %Now% on %Today% due to copy warning %CopyError%. >> %LogFile%
GOTO %NextStep%


GOTO End
:CopyError3
Echo CopyError 3
REM CopyError3 is a combination of errors 2 and 1 and is not considered an error
REM requiring administrative intervention
SET NextStep=CE3-2
GOTO CopyError2
:CE3-2
SET NextStep=CE3-3
GOTO CopyError1
:CE3-3
GOTO Cleanup2


GOTO END
:CopyError2
Echo CopyError 2
REM     errorlevel 2 Extra
IF %COPYERROR% EQU 2 SET NEXTSTEP=Cleanup2
IF %COPYERROR% EQU 2 SET MailPriority=Informational
echo. >> %LogFile%
echo A notice event has occurred while executing %CMMD% %PARMS%  >> %LogFile%
echo Some Extra files or directories were detected. >> %LogFile%
echo Examine the output log for details. >> %LogFile%
echo. >> %LogFile%
echo. >> %LogFile%
echo Script notice at %Now% on %Today% due to notice %CopyError%. >> %LogFile%
GOTO %NextStep%


GOTO END
:CopyError1
Echo CopyError 1
REM     errorlevel 1 OKCOPY
IF %COPYERROR% EQU 1 SET NEXTSTEP=Cleanup2
IF %COPYERROR% EQU 1 SET MailPriority=Informational
echo. >> %LogFile%
echo One or more files were copied successfully (that is, new files have arrived). >> %LogFile%
echo. >> %LogFile%
echo. >> %LogFile%
GOTO %NextStep%


GOTO END
:CopyError0
Echo CopyError 0
SET NextStep=Cleanup
REM     errorlevel 0 OK-Nothing Done
IF %COPYERROR% EQU 0 SET NEXTSTEP=Cleanup2
SET MailPriority=Informational
echo. >> %LogFile%
echo Robocopy detected no changed files and exited with status code 0. >> %LogFile%
echo. >> %LogFile%
echo. >> %LogFile%
GOTO %NextStep%


:Cleanup
Echo Beginning cleanup
REM Mail the logfile, destroy all in-use variables, clear the errorlevel and exit.
SET SMTPSubject=%MailPriority%:Issue with %COMPUTERNAME%
SET CMMD="%BinPath%\%Mailer%"
SET PARMS=-s %SMTPServer% -t %SMTPTo% -f %SMTPFrom% -a %SMTPSubject% -m "%LogFile%" -c -d
%CMMD% %PARMS% >> %LogDir%\%Today%-%Now%-Mailer.log 2>>%LogDir%\Errorlog.log
:Cleanup2
SET Today=
SET Now=
SET CMMD=
SET PARMS=
SET ERRORLEVEL=
SET Caller=
SET NextStep=
SET CopyError=
SET LogFile=
SET LogDir=
SET BinPath=
SET SourceServer=
SET SourceShare=
SET Copier=
SET Mailer=
SET SMTPServer=
SET SMTPTo=
SET SMTPFrom=
SET SMTPSubject=
SET MailPriority=
SET DestinationServer=
SET DestinationShare=

GOTO END

REM -------------------------------------------------------------------------------
REM    BMail    ::    Command Line E-mail Sender for Windows    ::    Version 1.07
REM -------------------------------------------------------------------------------
REM Command Line SMTP Emailer V1.07
REM Copyright(C) 2002-2004 Craig.Peacock@beyondlogic.org
REM Usage: bmail [options]
REM         -s    SMTP Server Name
REM         -p    SMTP Port Number (optional, defaults to 25)
REM         -t    To: Address
REM         -f    From: Address
REM         -b    Text Body of Message (optional)
REM         -h    Generate Headers
REM         -a    Subject (optional)
REM         -m    Filename (optional) Use file as Body of Message
REM         -c    Prefix above file with CR/LF to separate body from header
REM         -d    Debug (Show all mail server communications)
REM -------------------------------------------------------------------------------

REM -------------------------------------------------------------------------------
REM    ROBOCOPY     ::     Robust File Copy for Windows     ::     Version XP010
REM -------------------------------------------------------------------------------
REM 
REM   Started : Wed Dec 01 14:15:20 2010
REM 
REM               Usage :: ROBOCOPY source destination [file [file]...] [options]
REM 
REM              source :: Source Directory (drive:\path or \\server\share\path).
REM         destination :: Destination Dir  (drive:\path or \\server\share\path).
REM                file :: File(s) to copy  (names/wildcards: default is "*.*").
REM 
REM ::
REM :: Copy options :
REM ::
REM                  /S :: copy Subdirectories, but not empty ones.
REM                  /E :: copy subdirectories, including Empty ones.
REM              /LEV:n :: only copy the top n LEVels of the source directory tree.
REM 
REM                  /Z :: copy files in restartable mode.
REM                  /B :: copy files in Backup mode.
REM                 /ZB :: use restartable mode; if access denied use Backup mode.
REM 
REM   /COPY:copyflag[s] :: what to COPY (default is /COPY:DAT).
REM                        (copyflags : D=Data, A=Attributes, T=Timestamps).
REM                        (S=Security=NTFS ACLs, O=Owner info, U=aUditing info).
REM 
REM                /SEC :: copy files with SECurity (equivalent to /COPY:DATS).
REM            /COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).
REM             /NOCOPY :: COPY NO file info (useful with /PURGE).
REM 
REM              /PURGE :: delete dest files/dirs that no longer exist in source.
REM                /MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).
REM 
REM                /MOV :: MOVe files (delete from source after copying).
REM               /MOVE :: MOVE files AND dirs (delete from source after copying).
REM 
REM        /A+:[RASHNT] :: add the given Attributes to copied files.
REM        /A-:[RASHNT] :: remove the given Attributes from copied files.
REM 
REM             /CREATE :: CREATE directory tree and zero-length files only.
REM                /FAT :: create destination files using 8.3 FAT file names only.
REM                /FFT :: assume FAT File Times (2-second granularity).
REM                /256 :: turn off very long path (> 256 characters) support.
REM 
REM              /MON:n :: MONitor source; run again when more than n changes seen.
REM              /MOT:m :: MOnitor source; run again in m minutes Time, if changed.
REM 
REM       /RH:hhmm-hhmm :: Run Hours - times when new copies may be started.
REM                 /PF :: check run hours on a Per File (not per pass) basis.
REM 
REM              /IPG:n :: Inter-Packet Gap (ms), to free bandwidth on slow lines.
REM 
REM ::
REM :: File Selection Options :
REM ::
REM                  /A :: copy only files with the Archive attribute set.
REM                  /M :: copy only files with the Archive attribute and reset it.
REM     /IA:[RASHCNETO] :: Include only files with any of the given Attributes set.
REM     /XA:[RASHCNETO] :: eXclude files with any of the given Attributes set.
REM 
REM  /XF file [file]... :: eXclude Files matching given names/paths/wildcards.
REM  /XD dirs [dirs]... :: eXclude Directories matching given names/paths.
REM 
REM                 /XC :: eXclude Changed files.
REM                 /XN :: eXclude Newer files.
REM                 /XO :: eXclude Older files.
REM                 /XX :: eXclude eXtra files and directories.
REM                 /XL :: eXclude Lonely files and directories.
REM                 /IS :: Include Same files.
REM                 /IT :: Include Tweaked files.
REM 
REM              /MAX:n :: MAXimum file size - exclude files bigger than n bytes.
REM              /MIN:n :: MINimum file size - exclude files smaller than n bytes.
REM 
REM           /MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date.
REM           /MINAGE:n :: MINimum file AGE - exclude files newer than n days/date.
REM           /MAXLAD:n :: MAXimum Last Access Date - exclude files unused since n.
REM           /MINLAD:n :: MINimum Last Access Date - exclude files used since n.
REM                        (If n < 1900 then n = n days, else n = YYYYMMDD date).
REM 
REM                 /XJ :: eXclude Junction points. (normally included by default).
REM 
REM ::
REM :: Retry Options :
REM ::
REM                /R:n :: number of Retries on failed copies: default 1 million.
REM                /W:n :: Wait time between retries: default is 30 seconds.
REM 
REM                /REG :: Save /R:n and /W:n in the Registry as default settings.
REM 
REM                /TBD :: wait for sharenames To Be Defined (retry error 67).
REM ::
REM :: Logging Options :
REM ::
REM                  /L :: List only - don't copy, timestamp or delete any files.
REM                  /X :: report all eXtra files, not just those selected.
REM                  /V :: produce Verbose output, showing skipped files.
REM                 /TS :: include source file Time Stamps in the output.
REM                 /FP :: include Full Pathname of files in the output.
REM 
REM                 /NS :: No Size - don't log file sizes.
REM                 /NC :: No Class - don't log file classes.
REM                /NFL :: No File List - don't log file names.
REM                /NDL :: No Directory List - don't log directory names.
REM 
REM                 /NP :: No Progress - don't display % copied.
REM                /ETA :: show Estimated Time of Arrival of copied files.
REM 
REM           /LOG:file :: output status to LOG file (overwrite existing log).
REM          /LOG+:file :: output status to LOG file (append to existing log).
REM 
REM                /TEE :: output to console window, as well as the log file.
REM 
REM                /NJH :: No Job Header.
REM                /NJS :: No Job Summary.
REM 
REM ::
REM :: Job Options :
REM ::
REM        /JOB:jobname :: take parameters from the named JOB file.
REM       /SAVE:jobname :: SAVE parameters to the named job file
REM               /QUIT :: QUIT after processing command line (to view parameters).
REM 
REM               /NOSD :: NO Source Directory is specified.
REM               /NODD :: NO Destination Directory is specified.
REM                 /IF :: Include the following Files.
REM -------------------------------------------------------------------------------
REM -------------------------------------------------------------------------------
REM The return code from Robocopy is a bit map, defined as follows:
REM -------------------------------------------------------------------------------
REM     Hex   Decimal  Meaning if set
REM     0×10  16       Serious error. Robocopy did not copy any files.
REM                    Either a usage error or an error due to insufficient access
REM                    privileges on the source or destination directories.
REM -------------------------------------------------------------------------------
REM     0×08   8       Some files or directories could not be copied
REM                    (copy errors occurred and the retry limit was exceeded).
REM                    Check these errors further.
REM -------------------------------------------------------------------------------
REM     0×04   4       Some Mismatched files or directories were detected.
REM                    Examine the output log. Some housekeeping may be needed.
REM -------------------------------------------------------------------------------
REM     0×02   2       Some Extra files or directories were detected.
REM                    Examine the output log for details. 
REM -------------------------------------------------------------------------------
REM     0×01   1       One or more files were copied successfully (that is, new
REM                    files have arrived).
REM -------------------------------------------------------------------------------
REM     0×00   0       No errors occurred, and no copying was done.
REM                    The source and destination directory trees are completely
REM                    synchronized. 
REM -------------------------------------------------------------------------------
REM -------------------------------------------------------------------------------
:END
Echo Ended

Open in new window

0
 

Author Comment

by:Joseph Salazar
ID: 39742411
Sounds Great !!!!

I was looking for more of a commercial solution

Cjoego
0
 

Author Comment

by:Joseph Salazar
ID: 39797591
Any Comments anyone?
0
 

Author Comment

by:Joseph Salazar
ID: 39849296
Anyone???
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

My previous article  (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/A_4466-A-beginners-guide-to-installing-SCCM2007-on-Windows-2008-R2-Server.html)detailed one possible method to get SCCM 2007 installed an…
Remote Apps is a feature in server 2008 which allows users to run applications off Remote Desktop Servers without having to log into them to run the applications.  The user can either have a desktop shortcut installed or go through the web portal to…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now