+ Post New Thread
Results 1 to 2 of 2
Scripts Thread, Rar archive with date backup script (.bat) in Coding and Web Development; Just made this and thought I'd post it in case anyone found any use for it. Backs up a drive ...
  1. #1

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,300
    Blog Entries
    6
    Thank Post
    1,248
    Thanked 456 Times in 296 Posts
    Rep Power
    156

    Rar archive with date backup script (.bat)

    Just made this and thought I'd post it in case anyone found any use for it.

    Backs up a drive to a rar archive, and appends the current date and time to the filename. Requires the rar archiver cli util to be in PATH or with the batch file.

    Code:
    @echo off
    REM Script to backup the share to a date/time stamped archive
    REM By R.R
    cls
    set year=%date:~6,4%
    set yr=%date:~8,2%
    set month=%date:~3,2%
    set day=%date:~0,2%
    set hour=%time:~0,2%
    set hour=%hour: =0%
    set min=%time:~3,2%
    set sec=%time:~6,2%
    
    echo Backing up ...
    rar a -r backup[%day%%month%%yr%-%hour%%min%].rar r:\*.*
    creates a file like : backup[080109-1443].rar

    Dunno if someones already made something like this but thought I'd just fire it up here anyway.

  2. IDG Tech News
  3. #2

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,300
    Blog Entries
    6
    Thank Post
    1,248
    Thanked 456 Times in 296 Posts
    Rep Power
    156
    Im glad i posted this here.. Saves me rewriting from scratch

SHARE:
+ Post New Thread

Similar Threads

  1. Help with Backup Script
    By soze in forum Scripts
    Replies: 5
    Last Post: 18th June 2008, 12:12 AM
  2. Backup PenDrive Script
    By SimpleSi in forum Scripts
    Replies: 9
    Last Post: 18th January 2007, 02:45 PM
  3. Deploy software (K-Lite) via a .bat script
    By OverWorked in forum How do you do....it?
    Replies: 2
    Last Post: 21st September 2006, 12:59 PM
  4. Backup Perl Script
    By ranj in forum Scripts
    Replies: 1
    Last Post: 30th April 2006, 08:02 PM
  5. Backup Script for NT backup and Robocopy
    By ChrisH in forum Scripts
    Replies: 12
    Last Post: 20th October 2005, 01:01 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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