i want to take backup my C & D drive with batch file ??????

Discussion in 'Windows 7 Software' started by anwar ahamed, Jul 14, 2014.

  1. anwar ahamed

    Joined:
    Jul 14, 2014
    Messages:
    1
    Likes Received:
    0
    any one know how to create batch file steps to take my c,d,e drive backup in external hard drive
     
    #1 anwar ahamed, Jul 14, 2014
    Last edited: Jul 15, 2014
  2. PowerHotmail

    PowerHotmail New Member

    Joined:
    Jul 9, 2014
    Messages:
    29
    Likes Received:
    1
    You Could Have Checked Online But I Checked And Think I Found One That Will Work
    Code:

    @echo off
    :start
    XCOPY "C:\Users\Harry\Documents\Test.txt" "C:\Users\Harry\Documents\Batch Tutorials" /w /f /-y
    TIMEOUT /t 3600 /nobreak
    goto start

    Change This Part "C:\Users\Harry\Documents\Test.txt" To The Location Of You The Things You Wanna Back Up
    And Change This Part "C:\Users\Harry\Documents\Batch Tutorials" To The Destionation Such As Your External Drive

    If You Don`t Know How To Create A Batch File
    Right Click On Desktop Go To New And Then Text Document
    Type The Code In
    Save As Backup.bat
    You Can Change Backup To Anything
    Then Under The Name There Will Be Save As Type Change It To All Files And Then Press Save
    There You Just Created A Batch File

    Original Link: http://www.sevenforums.com/backup-restore/299105-batch-file-copy-files-c-drive-usb.html
     
  3. PowerHotmail

    PowerHotmail New Member

    Joined:
    Jul 9, 2014
    Messages:
    29
    Likes Received:
    1
    @echo off
    :start
    XCOPY "C:\Users\Harry\Documents\Test.txt" "C:\Users\Harry\Documents\Batch Tutorials" /w /f /-y
    TIMEOUT /t 3600 /nobreak
    goto start
     
  4. Nency Willims

    Nency Willims New Member

    Joined:
    May 21, 2014
    Messages:
    14
    Likes Received:
    0
    To create a batch file, you need to follow certain steps. Click 'Start' menu, go to 'All Programs', move to 'Accessories' and select 'Notepad' from there.

    Enter the commands in the notepad for making batch file. Then, save it with an extension cmd or bat for example:-filename.cmd. Suppose, you want to save your images in E: drive. The batch file for this purpose may be like xcopy 'E:\Documents and Settings\username\My documents\My images' 'D:\ 'Image back up/e/y'. This batch file will make a copy of your images in E: drive and paste it on the folder 'Image backup' on D: drive. If you simple put D:, then the backup file will overlap the existing file. So, always create a new folder and then backup. /e means backup all directories and sub directories whereas /y indicates overwrite on existing files.
     

Share This Page

Loading...