my backup script using robocopy

Page 1 of 2 12 LastLast

  1. Posts : 28
    Windows 7 ultimate 32bit
       #1

    my backup script using robocopy


    robocopy /S /E /MOV %USERPROFILE%\Documents\ G:\backup\Documents\
    robocopy /S /E /MOV %USERPROFILE%\Pictures\ G:\backup\Pictures\
    robocopy /S /E /MOV %USERPROFILE%\Downloads\ G:\backup\DownloadS\
    robocopy /S /E /MOV %USERPROFILE%\Favorites\ G:\backup\Favorites\
    robocopy /S /E /MOV %USERPROFILE%\Desktop\ G:\backup\Desktop\
    robocopy /S /E /MOv %USERPROFILE%\Music\ G:\backup\Music\

    rmdir /S /Q %USERPROFILE%\Documents\
    rmdir /S /Q %USERPROFILE%\Pictures\
    rmdir /S /Q %USERPROFILE%\Downloads\
    rmdir /S /Q %USERPROFILE%\Music\
    rmdir /S /Q %USERPROFILE%\Favorites\
    rmdir /S /Q %USERPROFILE%\Desktop\
    mkdir %USERPROFILE%\Documents
    mkdir %USERPROFILE%\Pictures
    mkdir %USERPROFILE%\Downloads
    mkdir %USERPROFILE%\Music
    mkdir %USERPROFILE%\Favorites
    mkdir %USERPROFILE%\Desktop
      My Computer


  2. Posts : 28
    Windows 7 ultimate 32bit
    Thread Starter
       #2

    think this works better...
    echo.
    echo ******************************
    echo *** Robocopy Backup Script ***
    echo ******************************
    echo.
    Robocopy /MOVE /S /E %USERPROFILE%\Documents\ G:\backup\Documents\ /e /np /tee /mt:4 /log:my_backup_log.txt
    Robocopy /MOVE /S /E %USERPROFILE%\Pictures\ G:\backup\Pictures\ /e /np /tee /mt:4 /log+:my_backup_log.txt
    Robocopy /MOVE /S /E %USERPROFILE%\Downloads\ G:\backup\DownloadS\ /e /np /tee /mt:4 /log+:my_backup_log.txt
    Robocopy /MOVE /S /E %USERPROFILE%\Desktop\ G:\backup\Desktop\ /e /np /tee /mt:4 /log+:my_backup_log.txt
    Robocopy /MOVE /S /E %USERPROFILE%\Music\ G:\backup\Music\ /e /np /tee /mt:4 /log+:my_backup_log.txt
    Robocopy /MOVE /S /E %USERPROFILE%\Favorites\ G:\backup\Favorites\ /e /np /tee /mt:4 /log+:my_backup_log.txt

    rmdir /S /Q %USERPROFILE%\Documents\
    rmdir /S /Q %USERPROFILE%\Pictures\
    rmdir /S /Q %USERPROFILE%\Downloads\
    rmdir /S /Q %USERPROFILE%\Music\
    rmdir /S /Q %USERPROFILE%\Favorites\
    rmdir /S /Q %USERPROFILE%\Desktop\
    mkdir %USERPROFILE%\Desktop
    mkdir %USERPROFILE%\Documents
    mkdir %USERPROFILE%\Pictures
    mkdir %USERPROFILE%\Downloads
    mkdir %USERPROFILE%\Music
    mkdir %USERPROFILE%\Favorites
    pause
    Last edited by Hynt; 30 Jun 2017 at 06:20. Reason: shold work now!
      My Computer


  3. Posts : 7,351
    Windows 7 HP 64
       #3

    Needs to add documentation (; move data to G: )
    As I understood:
    - You move data to G:
    - You delete the user data folder
    - You create new user data folder

    So if, for any reason, it can't move data to G: all user data will be erased?
      My Computers


  4. Posts : 28
    Windows 7 ultimate 32bit
    Thread Starter
       #4

    The first exempel had problem.
    but after editing source it''s OK"..
    thanks to post here on sevenforums
      My Computer


  5. Posts : 28
    Windows 7 ultimate 32bit
    Thread Starter
       #5

    Use this script to backup user files.
    It's true data on c:\ removes.
    But first copy everything to g:\
    Last edited by Hynt; 30 Jun 2017 at 10:02. Reason: Edit
      My Computer


  6. Posts : 7,351
    Windows 7 HP 64
       #6

    Backup scripts doesn't delete source data.
    As I wrote, if, for some reason, it doesn't copy to G:, you will loose all data as you delete the source data.
      My Computers


  7. Posts : 28
    Windows 7 ultimate 32bit
    Thread Starter
       #7

    Small c:\ disk
    Data on g:\ don't removes

    backup script thats remove source data - Google Search
    Last edited by Hynt; 30 Jun 2017 at 10:56.
      My Computer


  8. Posts : 28
    Windows 7 ultimate 32bit
    Thread Starter
       #8

    Have done a small script for backup purposes because the script moves all users files and then deletes them from the c: i want to make sure that the user approves it .. feels a bit like half-time programming otherwise
      My Computer


  9. Posts : 28
    Windows 7 ultimate 32bit
    Thread Starter
       #9

    echo.
    echo ******************************
    echo *** Robocopy Backup Script ***
    echo ******************************
    echo Disk Drivers: C:\ D:\ E:\ F:\ G:\ H:\
    echo all users files "folders" are then stored
    echo on the disk you enter in a folder named backup!

    set /p Disk=Enter Disk Driv
    echo %Disk% is selected!
    CLS
    Robocopy /MIR /S /E %USERPROFILE%\Documents\ backup\Documents\ /e /np /tee
    Robocopy /MIR /S /E %USERPROFILE%\Pictures\ F:\backup\Pictures\ /e /np /tee
    Robocopy /MIR /S /E %USERPROFILE%\Downloads\ F:\backup\DownloadS\ /e /np /tee
    Robocopy /MIR /S /E %USERPROFILE%\Desktop\ F:\backup\Desktop\ /e /np /tee
    Robocopy /MIR /S /E %USERPROFILE%\Music\ F:\backup\Music\ /e /np /tee
    Robocopy /MIR /S /E %USERPROFILE%\Favorites\ F:\backup\Favorites\ /e /np /tee
    pause>nul
    goto home
      My Computer


  10. Posts : 28
    Windows 7 ultimate 32bit
    Thread Starter
       #10

    Instead of f:\ .. %Disk%
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:18.
Find Us