Results 1 to 2 of 2

Thread: Backup Batch File Problem

  1. #1
    Join Date
    Oct 2010
    Posts
    1

    Backup Batch File Problem

    Hi Guys

    Hoping someone can help.

    I have a batch file on my pc that backs up the Database on a dily basis (a windows task run at 09:00) at the moment it is pretty basic and I need it to be tidied up.

    Then, I need it to check the files have been backed up after and alert me if it hasnt worked, as at the moment the batch file runs and unless im watchign it I cant tell if the files have copied.

    Code for the batch file currently used :
    Code:
    Echo on
    
    Set FDate=%Date:~-10,10%
    Set Fdate=%FDate:/=-%
    
    i:
    cd\
    cd folder1
    cd folder2
    cd _backups
    cd BAFADA~1
    
    MD %FDate%
    
    copy "I:\folder\folder\BAFA Database\*.*" "I:\folder1\folder2\_Backups\BAFA Database Backups\%FDate%"
    
    ::CLS
    @echo off
    Echo The Database has now been backed up.
    Thanks for looking

    Graham

  2. #2
    Join Date
    Feb 2010
    Posts
    524

    Re: Backup Batch File Problem

    I am having some sample of coding that will get DAY, DATE and TIME into variables.
    Code:
    :: DtimeDOS.bat
    @echo off
    echo.|date>datevaria.bat
    echo.|time>timevaria.bat
    echo set DATEvaria=%%4>current.bat
    call datevaria
    echo set DAYvaria=%%3>current.bat
    call datevaria
    echo set TIMEvaria=%%3>current.bat
    call timevaria
    :: done
    Note that it may require to be bespoke for the reason that the output of the DATE & TIME will fluctuate according to version, language, codepage etc.

Similar Threads

  1. Batch file execution problem
    By hwp in forum Windows XP Support
    Replies: 3
    Last Post: 02-04-2012, 05:49 AM
  2. Windows Batch file to output directory names and size to txt file
    By m2thearkus in forum Software Development
    Replies: 6
    Last Post: 16-07-2010, 12:04 AM
  3. Acronis 2009 Pst file backup problem
    By Mr. Gupta in forum Windows Software
    Replies: 2
    Last Post: 04-04-2009, 08:39 PM
  4. Replies: 3
    Last Post: 12-03-2009, 12:56 PM
  5. Batch file for Daily backup with Robocopy
    By Dave Allen in forum Windows Server Help
    Replies: 3
    Last Post: 08-01-2009, 09:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,256,137.37353 seconds with 16 queries