ROBOCOPY - Create Backup Script

Page 6 of 32 FirstFirst ... 4567816 ... LastLast

  1. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
    Thread Starter
       #50

    Great stuff Burdus - there is real wealth of knowledge accumulated here.
      My Computer


  2. Posts : 2,177
    Windows 8.1 Pro x64
       #51

    Golden said:
    Great stuff Burdus - there is real wealth of knowledge accumulated here.
    Your not wrong there
      My Computer


  3. Posts : 136
    Windows 7
       #52

    If only you had written this article a year and a half ago. :-P

    Great work Golden.
      My Computer


  4. Posts : 19,383
    Windows 10 Pro x64 ; Xubuntu x64
    Thread Starter
       #53

    Thanks BSeanD :)
      My Computer


  5. Posts : 1
    Server 2008
       #54

    For years I've used an xcopy replacement utility called xxcopy and it functions a lot like Robocopy. It's /clone switch is a lot like Robocopy's /MIR switch.

    One thing it does that, as far as I can tell, Robocopy can't, is create destination folder names based on the date. For instance, tonight's incremental backup would be in a folder called 2012-03-29.

    With Robocopy in a batch file I've been deleting folders named for the weekday and having them recreated in the destination when Robocopy runs. As in...

    :mon
    rmdir x:\backup\Daily\1-Monday\ /S /Q
    robocopy d:\shared x:\backup\Daily\1-Monday [long list of switches]

    The batch file starts by testing for the day of the week and then skips to the part of the batch file for that day (as in :mon). I end up with 7 backup folders only containing files that had the archive bit set for that given day.

    But I only get seven days, unless I can figure out how to get the task manager to run two batch files on alternating weeks.

    Any ideas on how to get incremental backups that go back further than one week?
      My Computer


  6. Posts : 1
    Windows 7 32-bit and 64 bit
       #55

    Need Help with Robocopy script


    Hi Golden,

    I Need your help with robocopy script.

    I have extenal IP hard drive 2 TB each and 4 of them. I want to write a script so It will check if Hardrive is live and copy the data over there. When its copy new data I want to create a new folder with current date like " Backup 12-04-25"

    So far this is what i can do in my test.

    robocopy "C:\SQL" C:\Backup\ /copyAT /e /z /v /tee /log:c:backup_log.txt
    pause

    Can you help?

    Thanks,
    Arpit


    Golden said:
    Hi,

    OK. You need to let me know what you want backing up, and to where.

    The easiest way is to show me some screen capture images of:

    1. Your Disk Management with your USB external drive plugged in (so I can see the arrangement of your disks)
    2. Windows Explorer showing me the paths and files you want to backup.

    See here for help on getting me the information:

    Screenshots and Files - Upload and Post in Seven Forums

    Regards,
    Golden
      My Computer


  7. Posts : 3
    7 64bit
       #56

    Hi All,

    I have written a robocopy script to migrate the company I work for from XP to 7 64bit and to do transfers from 7 to 7 for future data back up and restore after reimaging machines.

    Like most scripts you can only look at it so long before it starts to run together. Would it be ok to post it here to get another set of eyes on it? It works really well but I just want to make sure I have not left something out or have to much in terms of the switches.
      My Computer


  8. Posts : 72,045
    64-bit Windows 11 Pro for Workstations
       #57

    Hello Haus, and welcome to Seven Forums.

    Sure, it'll be fine to post here if you like. :)
      My Computer


  9. Posts : 3
    7 64bit
       #58

    Great!

    Let me explain a bit what I have it doing first then I'll put it in the next post.
    I made it to be an interactive "program" for lack of a better term.
    I have distributed it out to my 16 co-workers in 8 different sites around the country as we have have the task of moving 5000 users to Windows 7.

    It is launched from a folder containing the .cmd file and robocopy.exe (for portability).
    The script opens a command prompt window where you make a task selection. 1-7, 0 to exit.
    The options1-2 are direct machine to machine data transfers over the LAN. XP to 7 & 7 to 7.
    The options 3-4 are for hard drive pulls from the old machine using a powered USB drive adaptor for data transfer to the new machine.
    The options 5-6 are to copy the data to an extrenal USB storage device.
    Option 7 restores it from the USB drive.

    In it you will see that I have per-converted all XP folders/locations to Windows 7 folder/locations for easier restore.

    So to launch it, you just double click the cmd file in a folder with the robocopy.exe in it (for XP).
    You then get a prompt asking for UserID, Old computer name, drive letter, depending on the selection.
    After that you'll get the idea what happens.
    Script in the next post.

    Code:
     
    @ECHO OFF
    c:\windows\system32\cmd.exe /c mode con cols=100 lines=45
    Color 3F
    CLS
    :MENU
    ECHO.________________________________________________________________________________
    ECHO.
    ECHO. Windows 7 Migration Tool
    ECHO.
    ECHO. Note: All data copies from Windows XP are translated into the Windows 7
    ECHO. directory structure. ("Documents and Settings" to "Users", etc.)
    ECHO.
    ECHO. !!!Remember to turn off UAC and set power option to never sleep!!!
    ECHO.________________________________________________________________________________
    ECHO.
    ECHO ............................................................
    ECHO PRESS 1 2 3 4 5 6 7 to select your task, or 0 to EXIT.
    ECHO ............................................................
    ECHO.
    ECHO 1 - Network Data Transfer: Old XP (remote) to new Windows 7 (local)
    ECHO.
    ECHO 2 - Network Data Transfer: Old 7 (remote) to new Windows 7 (local)
    ECHO.
    ECHO 3 - Local USB Drive Adaptor XP drive to 7 (C:) (local)
    ECHO.
    ECHO 4 - Local USB Drive Adaptor 7 drive to 7 (C:) (local)
    ECHO.
    ECHO 5 - Local USB Data Backup: Local XP (C:) to local USB drive
    ECHO.
    ECHO 6 - Local USB Data Backup: Local 7 (C:) to local USB drive
    ECHO.
    ECHO 7 - USB Drive Restore: Restore local USB drive to new Windows 7 (local)
    ECHO.
    ECHO 0 - EXIT
    ECHO.
    SET /P M=Type 1, 2, 3, 4, 5, 6, 7, or 0, then press ENTER: 
    IF %M%==1 GOTO XPto7
    IF %M%==2 GOTO 7to7
    IF %M%==3 GOTO XPUSBtoC
    IF %M%==4 GOTO 7USBtoC
    IF %M%==5 GOTO XPCtoE
    IF %M%==6 GOTO 7CtoE
    IF %M%==7 GOTO ResEtoC7
    IF %M%==0 GOTO Quit
    rem ------------------------------------------------------------------------
    :XPto7
    ECHO.
    ECHO.[-----Network Data Transfer: Old XP to New 7-----]
    ECHO.
    NET USE Z: /Delete > NUL
    ECHO Enter Users OracleID:
    Set /p USER=
    REM OracleID is equivelent to AD User ID
    ECHO.
    ECHO Network Share: Enter the user's old XP Computer Name:
    Set /P OldXP=
    NET USE Z: \\%OldXP%\C$
    REM 
    robocopy Z:\ C:\ /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "autoexec.bat" "boot.ini" "cmldr" "config.sys" "Desktop.ini" "hiberfil.sys" "IO.SYS" "NTDETECT.COM" "ntldr" "MSDOS.SYS" "pagefile.sys" "Thumbs.db" /XD ".Xilinx" "Applications" "Cadence" "CadenceHome" "cmdcons" "Config.msi" "Dell" "Documents and Settings" "Drivers" "i386" "Intel" "MSOCache" "Notes" "Program Files" "RECYCLER" "$Recycle.Bin" "SP3" "System Volume Information" "swshare" "swtools" "valueadd" "WINDOWS" "Xilinx" /L /LOG+:Step1.txt 
    robocopy Z:\Notes "C:\Program Files (x86)\Lotus\Notes" notes.ini /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy Z:\Notes\Data "C:\Program Files (x86)\Lotus\Notes\Data" /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\Desktop" C:\Users\%USER%\Desktop /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\Favorites" C:\Users\%USER%\Favorites /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\My Documents" C:\Users\%USER%\Documents /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /XD "Downloads" "Favorites" "Pictures" "My Pictures" "Music" "My Music" "Shapes" "My Shapes" "Videos" "My Videos" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\My Documents\Favorites" C:\Users\%USER%\Favorites /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\My Documents\My Music" C:\Users\%USER%\Music /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\My Documents\Downloads" C:\Users\%USER%\Downloads /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\My Documents\My Pictures" C:\Users\%USER%\Pictures /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\My Documents\My Videos" C:\Users\%USER%\Videos /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\My Documents\My Shapes" "C:\Users\%USER%\Documents\My Shapes" /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\Local Settings\Application Data\Microsoft\Outlook" "C:\Users\%USER%\Documents\Outlook Files" *.pst /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\Application Data\Microsoft\Signatures" C:\Users\%USER%\AppData\Roaming\Microsoft\Signatures /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\Application Data\Microsoft\Stationery" "C:\Program Files (x86)\Common Files\Microsoft Shared\Stationery" /E /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\Application Data\Microsoft\Templates" C:\Users\%USER%\AppData\Roaming\Microsoft\Templates /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\Application Data\Microsoft\Proof" C:\Users\%USER%\AppData\Roaming\Microsoft\UProof /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\Application Data\Microsoft\UProof" C:\Users\%USER%\AppData\Roaming\Microsoft\UProof /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\Application Data\Microsoft\Outlook" C:\Users\%USER%\AppData\Roaming\Microsoft\Outlook *.nk2 /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Documents and Settings\%USER%\Local Settings\Application Data\Microsoft\Outlook" C:\Users\%user%\AppData\Local\Microsoft\Outlook *.pab *.oab /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    NET USE Z: /Delete > NUL
    GOTO END
    rem ------------------------------------------------------------------------
    :7to7
    ECHO.
    ECHO.[------Network Data Transfer: Old 7 to New 7------]
    ECHO.
    NET USE Z: /Delete > NUL
    ECHO Enter Users OracleID:
    Set /p USER=
    REM OracleID is equivelent to AD User ID
    ECHO.
    ECHO Network Share: Enter the user's old 7 Computer Name:
    Set /P Old7=
    NET USE Z: \\%Old7%\C$
    REM 
    robocopy Z:\ C:\ /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /XF "*.log" "Thumbs.db" "Desktop.ini" ".rnd" "bootmgr" "hiberfil.sys" "pagefile.sys" /XD ".Xilinx" "Applications" "Boot" "Cadence" "CadenceHome" "Config.msi" "de8b2a33417deb7cb2a115cae06cd1" "Dell" "Documents and Settings" "Drivers" "Intel" "Kontiki" "MSOCache" "PerfLogs" "Program Files" "Program Files (x86)" "ProgramData" "Recovery" "$Recycle.Bin" "RECYCLER" "System Volume Information" "USERS" "WINDOWS" "Xilinx" /L /LOG+:Step1.txt 
    robocopy "Z:\Program Files (x86)\Lotus\Notes" "C:\Program Files (x86)\Lotus\Notes" notes.ini /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Program Files (x86)\Lotus\Notes\Data" "C:\Program Files (x86)\Lotus\Notes\Data" /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "Z:\Program Files (x86)\Common Files\Microsoft Shared\Stationery" "C:\Program Files (x86)\Common Files\Microsoft Shared\Stationery" /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy Z:\Users\%USER% C:\Users\%USER% /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "Album*.jpg" "*.log" *.policy" "Thumbs.db" "Desktop.ini" "ntuser*.*" /XD "AppData" "Application Data" "Local Settings" "Office Genuine Advantage" /L /LOG+:Step1.txt 
    robocopy Z:\Users\%USER%\Documents C:\Users\%USER%\Documents /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "Album*.jpg" "*.log" *.policy" "Thumbs.db" "Desktop.ini" "ntuser*.*" /XD "AppData" "Application Data" "Local Settings" "Office Genuine Advantage" /L /LOG+:Step1.txt 
    robocopy Z:\Users\%USER%\AppData\Roaming\Microsoft\Signatures C:\Users\%USER%\AppData\Roaming\Microsoft\Signatures /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy Z:\Users\%USER%\AppData\Roaming\Microsoft\Templates C:\Users\%USER%\AppData\Roaming\Microsoft\Templates /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy Z:\Users\%USER%\AppData\Roaming\Microsoft\UProof C:\Users\%USER%\AppData\Roaming\Microsoft\UProof /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy Z:\Users\%USER%\AppData\Roaming\Microsoft\Outlook C:\Users\%USER%\AppData\Roaming\Microsoft\Outlook *.nk2 /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy Z:\Users\%user%\AppData\Local\Microsoft\Outlook C:\Users\%user%\AppData\Local\Microsoft\Outlook *.pab *.oab /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    NET USE Z: /Delete > NUL
    GOTO END
    rem ------------------------------------------------------------------------
    :XPUSBtoC
    ECHO.
    ECHO.[----------Pulled Drive on USB Drive Adapter XP Data Transfer to 7-----------]
    ECHO.
    ECHO Enter Users OracleID:
    Set /p USER=
    REM OracleID is equivelent to AD User ID
    ECHO.
    ECHO Enter the USB drive letter: (example) X:
    Set /p USBDrive=
    REM
    robocopy %USBDrive% C:\ /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "autoexec.bat" "boot.ini" "cmldr" "config.sys" "Desktop.ini" "hiberfil.sys" "IO.SYS" "NTDETECT.COM" "ntldr" "MSDOS.SYS" "pagefile.sys" "Thumbs.db" /XD ".Xilinx" "Applications" "Cadence" "CadenceHome" "cmdcons" "Config.msi" "Dell" "Documents and Settings" "Drivers" "i386" "Intel" "MSOCache" "Notes" "Program Files" "RECYCLER" "$Recycle.Bin" "SP3" "System Volume Information" "swshare" "swtools" "valueadd" "WINDOWS" "Xilinx" /L /LOG+:Step1.txt 
    robocopy %USBDrive%\Note "C:\Program Files (x86)\Lotus\Notes" notes.ini /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy %USBDrive%\Notes\Data "C:\Program Files (x86)\Lotus\Notes\Data" /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\Desktop" C:\Users\%USER%\Desktop /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\Favorites" C:\Users\%USER%\Favorites /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\My Documents" C:\Users\%USER%\Documents /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /XD "Downloads" "Favorites" "Pictures" "My Pictures" "Music" "My Music" "Shapes" "My Shapes" "Videos" "My Videos" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\My Documents\Favorites" C:\Users\%USER%\Favorites /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt
    robocopy "%USBDrive%\Documents and Settings\%USER%\My Documents\My Music" C:\Users\%USER%\Music /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\My Documents\Downloads" C:\Users\%USER%\Downloads /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\My Documents\My Pictures" C:\Users\%USER%\Pictures /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\My Documents\My Videos" C:\Users\%USER%\Videos /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\My Documents\My Shapes" "C:\Users\%USER%\Documents\My Shapes" /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\Local Settings\Application Data\Microsoft\Outlook" "C:\Users\%USER%\Documents\Outlook Files" *.pst /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\Application Data\Microsoft\Signatures" C:\Users\%USER%\AppData\Roaming\Microsoft\Signatures /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\Application Data\Microsoft\Stationery" "C:\Program Files (x86)\Common Files\Microsoft Shared\Stationery" /E /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\Application Data\Microsoft\Templates" C:\Users\%USER%\AppData\Roaming\Microsoft\Templates /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\Application Data\Microsoft\Proof" C:\Users\%USER%\AppData\Roaming\Microsoft\UProof /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\Application Data\Microsoft\UProof" C:\Users\%USER%\AppData\Roaming\Microsoft\UProof /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\Application Data\Microsoft\Outlook" C:\Users\%USER%\AppData\Roaming\Microsoft\Outlook *.nk2 /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Documents and Settings\%USER%\Local Settings\Application Data\Microsoft\Outlook" C:\Users\%user%\AppData\Local\Microsoft\Outlook *.pab *.oab /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    GOTO END
    rem ------------------------------------------------------------------------
    :7USBtoC
    ECHO.
    ECHO.[----------Pulled Drive on USB Drive Adapter 7 Data Transfer to 7-----------]
    ECHO.
    ECHO Enter Users OracleID:
    Set /p USER=
    REM OracleID is equivelent to AD User ID
    ECHO.
    ECHO Enter the USB drive letter: (example) X:
    Set /p USBDrive=
    REM
    robocopy %USBDrive% C:\ /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /XF "*.log" "Thumbs.db" "Desktop.ini" ".rnd" "bootmgr" "hiberfil.sys" "pagefile.sys" /XD ".Xilinx" "Applications" "Boot" "Cadence" "CadenceHome" "Config.msi" "de8b2a33417deb7cb2a115cae06cd1" "Dell" "Documents and Settings" "Drivers" "Intel" "Kontiki" "MSOCache" "PerfLogs" "Program Files" "Program Files (x86)" "ProgramData" "Recovery" "$Recycle.Bin" "RECYCLER" "System Volume Information" "USERS" "WINDOWS" "Xilinx" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Program Files (x86)\Lotus\Notes" "C:\Program Files (x86)\Lotus\Notes" notes.ini /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Program Files (x86)\Lotus\Notes\Data" "C:\Program Files (x86)\Lotus\Notes\Data" /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "%USBDrive%\Program Files (x86)\Common Files\Microsoft Shared\Stationery" "C:\Program Files (x86)\Common Files\Microsoft Shared\Stationery" /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy %USBDrive%\Users\%USER% C:\Users\%USER% /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "Album*.jpg" "*.log" *.policy" "Thumbs.db" "Desktop.ini" "ntuser*.*" /XD "AppData" "Application Data" "Local Settings" "Office Genuine Advantage" /L /LOG+:Step1.txt 
    robocopy %USBDrive%\Users\%USER%\Documents C:\Users\%USER%\Documents /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "Album*.jpg" "*.log" *.policy" "Thumbs.db" "Desktop.ini" "ntuser*.*" /XD "AppData" "Application Data" "Local Settings" "Office Genuine Advantage" /L /LOG+:Step1.txt 
    robocopy %USBDrive%\Users\%USER%\AppData\Roaming\Microsoft\Signatures C:\Users\%USER%\AppData\Roaming\Microsoft\Signatures /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy %USBDrive%\Users\%USER%\AppData\Roaming\Microsoft\Templates C:\Users\%USER%\AppData\Roaming\Microsoft\Templates /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy %USBDrive%\Users\%USER%\AppData\Roaming\Microsoft\UProof C:\Users\%USER%\AppData\Roaming\Microsoft\UProof /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy %USBDrive%\Users\%USER%\AppData\Roaming\Microsoft\Outlook C:\Users\%USER%\AppData\Roaming\Microsoft\Outlook *.nk2 /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy %USBDrive%\Users\%user%\AppData\Local\Microsoft\Outlook C:\Users\%user%\AppData\Local\Microsoft\Outlook *.pab *.oab /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    GOTO END
    rem ------------------------------------------------------------------------
    :XPCtoE
    ECHO.
    ECHO.[-----------Old XP Machine Drive to USB Drive Backup-----------]
    ECHO.
    ECHO Enter Users OracleID:
    Set /p USER=
    REM OracleID is equivelent to AD User ID
    ECHO.
    ECHO Enter the USB drive letter: (example) X:
    Set /p USBDrive=
    MD %USBDrive%\%USER%
    REM
    robocopy C:\ %USBDrive%\%USER%\ /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "autoexec.bat" "boot.ini" "cmldr" "config.sys" "Desktop.ini" "hiberfil.sys" "IO.SYS" "NTDETECT.COM" "ntldr" "MSDOS.SYS" "pagefile.sys" "Thumbs.db" /XD ".Xilinx" "Applications" "Cadence" "CadenceHome" "cmdcons" "Config.msi" "Dell" "Documents and Settings" "Drivers" "i386" "Intel" "MSOCache" "Notes" "Program Files" "RECYCLER" "$Recycle.Bin" "SP3" "System Volume Information" "swshare" "swtools" "valueadd" "WINDOWS" "Xilinx" /L /LOG+:Step1.txt 
    robocopy C:\Notes "%USBDrive%\%USER%\Program Files (x86)\Lotus\Notes" notes.ini /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy C:\Notes\Data "%USBDrive%\%USER%\Program Files (x86)\Lotus\Notes\Data" /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\Desktop" %USBDrive%\%USER%\Users\%USER%\Desktop /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\Favorites" %USBDrive%\%USER%\Users\%USER%\Favorites /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\My Documents" %USBDrive%\%USER%\Users\%USER%\Documents /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /XD "Downloads" "Favorites" "Pictures" "My Pictures" "Music" "My Music" "Shapes" "My Shapes" "Videos" "My Videos" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\My Documents\Favorites" %USBDrive%\%USER%\Users\%USER%\Favorites /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\My Documents\My Music" %USBDrive%\%USER%\Users\%USER%\Music /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\My Documents\My Pictures" %USBDrive%\%USER%\Users\%USER%\Pictures /E /COPYALL /B /SEC /MIR /V /NP /R:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /W:2 /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\My Documents\My Videos" %USBDrive%\%USER%\Users\%USER%\Videos /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\My Documents\My Shapes" "%USBDrive%\%USER%\Users\%USER%\Documents\My Shapes" /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\My Documents\Downloads" %USBDrive%\%USER%\Users\%USER%\Downloads /E /COPY:DATSO /V /NP /R:2 /W:2 /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\Local Settings\Application Data\Microsoft\Outlook" "%USBDrive%\%USER%\Users\%USER%\Documents\Outlook Files" *.pst /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\Application Data\Microsoft\Signatures" %USBDrive%\%USER%\Users\%USER%\AppData\Roaming\Microsoft\Signatures /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\Application Data\Microsoft\Stationery" "%USBDrive%\%USER%\Program Files (x86)\Common Files\Microsoft Shared\Stationery" /E /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\Application Data\Microsoft\Templates" %USBDrive%\%USER%\Users\%USER%\AppData\Roaming\Microsoft\Templates /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\Application Data\Microsoft\Proof" %USBDrive%\%USER%\Users\%USER%\AppData\Roaming\Microsoft\UProof /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\Application Data\Microsoft\UProof" %USBDrive%\%USER%\Users\%USER%\AppData\Roaming\Microsoft\UProof /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\Application Data\Microsoft\Outlook" %USBDrive%\%USER%\Users\%USER%\AppData\Roaming\Microsoft\Outlook *.nk2 /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Documents and Settings\%USER%\Local Settings\Application Data\Microsoft\Outlook" %USBDrive%\%USER%\Users\%USER%\AppData\Local\Microsoft\Outlook *.pab *.oab /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    attrib -h -s %USBDrive%\%USER% 
    GOTO END
    rem ------------------------------------------------------------------------
    :7CtoE
    ECHO.
    ECHO.[------------Old 7 Machine Drive to USB Drive Backup------------]
    ECHO.
    ECHO Enter Users OracleID:
    Set /p USER=
    REM OracleID is equivelent to AD User ID
    ECHO.
    ECHO Enter the USB drive letter: (example) X:
    Set /p USBDrive=
    MD %USBDrive%\%USER%
    REM
    robocopy C:\ %USBDrive%\%USER%\ /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" ".rnd" "bootmgr" "hiberfil.sys" "pagefile.sys" /XD ".Xilinx" "Applications" "Boot" "Cadence" "CadenceHome" "Config.msi" "de8b2a33417deb7cb2a115cae06cd1" "Dell" "Documents and Settings" "Drivers" "Intel" "Kontiki" "MSOCache" "PerfLogs" "Program Files" "Program Files (x86)" "ProgramData" "Recovery" "$Recycle.Bin" "RECYCLER" "System Volume Information" "USERS" "WINDOWS" "Xilinx" /L /LOG+:Step1.txt 
    robocopy "C:\Program Files (x86)\Lotus\Notes" "%USBDrive%\%USER%\Program Files (x86)\Lotus\Notes" notes.ini /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Program Files (x86)\Lotus\Notes\Data" "%USBDrive%\%USER%\Program Files (x86)\Lotus\Notes\Data" /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy "C:\Program Files (x86)\Common Files\Microsoft Shared\Stationery" "%USBDrive%\%USER%\Program Files (x86)\Common Files\Microsoft Shared\Stationery" /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy C:\Users\%USER% %USBDrive%\%USER%\Users\%USER% /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "Album*.jpg" "*.log" "*.policy" "Thumbs.db" "Desktop.ini" "ntuser*.*" /XD "AppData" "Application Data" "Local Settings" "Office Genuine Advantage" /L /LOG+:Step1.txt 
    robocopy C:\Users\%USER%\Documents %USBDrive%\%USER%\Users\%USER%\Documents /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "Album*.jpg" "*.log" "*.policy" "Thumbs.db" "Desktop.ini" "ntuser*.*" /XD "AppData" "Application Data" "Local Settings" "Office Genuine Advantage" /L /LOG+:Step1.txt 
    robocopy C:\Users\%USER%\AppData\Roaming\Microsoft\Signatures %USBDrive%\%USER%\Users\%USER%\AppData\Roaming\Microsoft\Signatures /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy C:\Users\%USER%\AppData\Roaming\Microsoft\Templates %USBDrive%\%USER%\Users\%USER%\AppData\Roaming\Microsoft\Templates /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy C:\Users\%USER%\AppData\Roaming\Microsoft\UProof %USBDrive%\%USER%\Users\%USER%\AppData\Roaming\Microsoft\UProof /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy C:\Users\%USER%\AppData\Roaming\Microsoft\Outlook %USBDrive%\%USER%\Users\%USER%\AppData\Roaming\Microsoft\Outlook *.nk2 /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    robocopy C:\Users\%USER%\AppData\Local\Microsoft\Outlook %USBDrive%\%USER%\Users\%USER%\AppData\Local\Microsoft\Outlook *.pab *.oab /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "Thumbs.db" "Desktop.ini" /L /LOG+:Step1.txt 
    attrib -h -s %USBDrive%\%USER%
    GOTO END
    rem ------------------------------------------------------------------------
    :ResEtoC7
    ECHO.
    ECHO.[------------Local USB Drive 7 Data Restore------------]
    ECHO.
    ECHO Enter Users OracleID:
    Set /p USER=
    REM OracleID is equivelent to AD User ID
    ECHO.
    ECHO Enter the USB drive letter: (example) X:
    Set /p USBDrive=
    ECHO.
    robocopy %USBDrive%\%USER%\ C:\ /E /COPY:DATSO /V /NP /R:2 /W:2 /XA:SHO /XF "*.log" "$Recycle.Bin" "Thumbs.db" "Desktop.ini" /XD "$Recycle.Bin" /L /LOG+:Step1.txt 
    GOTO END
    :QUIT
    ECHO.________________________________________________________________________________
    ECHO.
    ECHO.
    ECHO. Terminated process, no action taken.
    ECHO.
    ECHO.
    ECHO.________________________________________________________________________________
    :END
    ECHO.________________________________________________________________________________
    ECHO.
    ECHO. Completed! check the log files below for results...
    ECHO.
    ECHO.________________________________________________________________________________
    ECHO.
    dir step*.txt /b
    ECHO.
    Pause
    As you can see we target specific data, makes for a better user experience.
    You will also see a couple what appeears to be duplicate lines, this because you can not trust users to put things where they go, you know what I am talking about.
    Last edited by Haus6565; 28 Apr 2012 at 20:24. Reason: merged and code box
      My Computer


  10. Posts : 3
    7 64bit
       #59

    Hi, just curious if anyone had a chance to give it a once over?
      My Computer


 
Page 6 of 32 FirstFirst ... 4567816 ... 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 09:19.
Find Us