I have a basis of a copy script (using xcopy) to copy over files for migrating over from one pc to another (xp to win7 in my case).
Here is the code: ...
xcopy /I /Y /E /F "C:\Documents and Settings\%USERNAME%\Favorites\*.*" h:\Restore\IE favorites
xcopy /I /Y /S /F "C:\Documents and Settings\%USERNAME%\Desktop" h:\restore\desktop
xcopy /I /Y /F "C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Outlook\*.nk2" h:\restore\Outlook-NK2
xcopy /I /Y /F "C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Signatures" h:\restore\Signatures
xcopy /I /Y /F "C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Office\*.acl" h:\restore\Office-AutoCorrectLists
xcopy /I /Y /F "C:\Documents and Settings\%USERNAME%\Local Settings\Application Data\Microsoft\Outlook\*.pst" h:\restore\PST1
xcopy /I /Y /F "C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Outlook\*.pst" h:\restore\PST2
xcopy /I /Y /F "C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Outlook" h:\restore\Roaming\Outlook
xcopy /I /Y /F "C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Signatures" h:\restore\Roaming\Signatures
regedit /s /e H:\restore\HKCU-RestoreODBC.reg "HKEY_CURRENT_USER\Software\ODBC\ODBC.INI"
regedit /s /e H:\restore\HKLM-RestoreODBC.reg "HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI"
regedit /s /e H:\restore\restornetwork.reg "HKEY_CURRENT_USER\Network"
regedit /s /e H:\restore\HKLM-RestoreIECert_machine.reg "HKEY_LOCAL_MACHINE\Software\Microsoft\SystemCertificates"
regedit /s /e H:\restore\HKCU-RestoreIECert_machine.reg "HKEY_CURRENT_USER\Software\Microsoft\SystemCertificates"
regedit /s /e H:\restore\RestorePrinterConnections.reg "HKEY_CURRENT_USER\Printers\Connections
I'd like to add a progress bar to the copying of the PST portion of the code, but I don;t know where to start with this. Would anyone mind helping me out with a few tips on how I could start with this?
Thanks very much.
Use ROBOCOPY instead of XCOPY. See ROBOCOPY /?