batch backup

Sharky Forums


Results 1 to 2 of 2

Thread: batch backup

  1. #1
    Reef Shark chronicle's Avatar
    Join Date
    Jan 2002
    Location
    NYC, NY, USA
    Posts
    311

    Arrow batch backup

    Hi everyone

    Searched the site 4 some batch files 4 windows, found this from Skeelo ->

    Code:
    @ECHO OFF
    REM Change NETDIR to include the network path you want your backups stored in
    set NETDIR=X:\Backups
    ECHO Backing up %1 to %NETDIR% >>backups.log
    date /t >> backups.log
    time /t >> backups.log
    echo +++>> backups.log
    ECHO =================================================== >>backups.log
    XCOPY %1 %NETDIR% /S /V /H /R /K /Y /C /I >>backups.log
    ECHO =================================================== >>backups.log 
    ECHO Backup Completed >>
    backups.log
    ECHO +++ >>backups.log
    ECHO. >>backups.log
    ECHO. >>backups.log
    echo Backed up %1 to %NETDIR%
    I really like the batch file, but my problem is this. The batch file just copies all existing files, not verifies if old ones have been delete. So if I delete a file in the original it still exists in the backup directory. Is there any command that can get past this?

    thanks
    CH

  2. #2
    Catfish Lan's Avatar
    Join Date
    Aug 2001
    Posts
    241
    Don't know why anybody would use xcopy... Have a look in the resource kit (NT4, probably Win2k) and see if you can find robocopy - it beats xcopy to a pulp!
    Why not visit my Technical Travel FAQ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •