Backup to external hardrive
I have just bought a 640gb external hardrive and I want to backup certain files to the HD when I click a shortcut on the desktop. I had a batch code for a backup, but that code was for XP and it doesn't work on vista. Is there a batch code that will backup certain files I set? This is the code I had for XP backup: echo off cls echo. echo. echo. ++Mayer Backup++ echo. echo. echo. This program will backup your Desktop, echo. My Documents, and your Outlook pst file. echo. echo. echo. Also please close down Outlook and any other echo. applications currently open, before continuing. echo. echo. echo. pause cls if exist "F:\backup %username%.bkf" goto :runonce sdclt backup "C:\Documents and Settings\%username%\Desktop\" /J "Desktop Backup" /F "F:\backup %username%.bkf"/V:yes /R:no /L:f /M normal sdclt backup "C:\Documents and Settings\%username%\My Documents\" /A /J "Desktop Backup" /F "F:\backup %username%.bkf"/V:yes /R:no /L:f /M normal sdclt backup "C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Outlook\" /A /J "Desktop Backup" /F "f:\backup %username%.bkf"/V:yes /R:no /L:f /M normal goto :eof echo. echo. echo. Your Backup should have completed successfully. echo. pause echo. echo. pause :runonce sdclt backup "C:\Documents and Settings\%username%\Desktop\" /A /J "Desktop Backup" /F "F:\backup %username%.bkf"/V:yes /R:no /L:f /M incremental sdclt backup "C:\Documents and Settings\%username%\My Documents\" /A /J "Desktop Backup" /F "F:\backup %username%.bkf"/V:yes /R:no /L:f /M incremental sdclt backup "C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\Outlook\" /A /J pause - Anyway to do this on Vista?
May 31st, 2009 2:15am

Joshua,1. In windows vista "C:\documents and settings\" doesn't exist any more. They changed it to "C:\users\"2. Also the location of your pst file is slightly changed. From c:\Documents and Settings\user\Local Settings\Application Data\Microsoft\Outlookto C:\Users\user\AppData\Local\Microsoft\Outlook.3. I fixed the code bellow. echo off cls echo. echo. echo. ++Mayer Backup++ echo. echo. echo. This program will backup your Desktop, echo. My Documents, and your Outlook pst file. echo. echo. echo. Also please close down Outlook and any other echo. applications currently open, before continuing. echo. echo. echo. pause cls if exist "F:\backup %username%.bkf" goto :runonce sdclt backup "%userprofile%\Desktop\" /J "Desktop Backup" /F "F:\backup %username%.bkf"/V:yes /R:no /L:f /M normal sdclt backup "%userprofile%\My Documents\" /A /J "Desktop Backup" /F "F:\backup %username%.bkf"/V:yes /R:no /L:f /M normal sdclt backup "%LOCALAPPDATA%\Microsoft\Outlook\" /A /J "Desktop Backup" /F "f:\backup %username%.bkf"/V:yes /R:no /L:f /M normal goto :eof echo. echo. echo. Your Backup should have completed successfully. echo. pause echo. echo. pause :runonce sdclt backup "%userprofile%\Desktop\" /A /J "Desktop Backup" /F "F:\backup %username%.bkf"/V:yes /R:no /L:f /M incremental sdclt backup "%userprofile%\My Documents\" /A /J "Desktop Backup" /F "F:\backup %username%.bkf"/V:yes /R:no /L:f /M incremental sdclt backup "%LOCALAPPDATA%\Microsoft\Outlook\" /A /J pause 4. When you run this batch file it is posible that you need this in an administrative command prompt.(More info about a administrative command prompt onhttp://www.geekstogo.com/forum/Windows-Vista-run-command-prompt-administrator-t146674.html).So, this normaly will fix your problem.If it doesn't post the error message.Does this resolves your problem?Kind RegardsDFT
Free Windows Admin Tool Kit Click here and download it now
June 3rd, 2009 5:12am

I changed the code to the one you edited and that doesn't work either. I press any key to continue and then it just closes like the other batch did. Any ideas? If this code won't work, can anyone recommend another way to do what I wan to do?
July 1st, 2009 12:48am

Joshua,Did you run this script in an elevated command prompt?If not try the following. Click on Vista Start button. Click on Run. Type in Cmd (without quotes) in the Open textbox. You should see This task will be created with administrative privileges. Click on OK or press Enter. Give in the complete path to your batch file. If there are errors post them back here. Does this resolves your problem?Kind Regards.DFTIM me
Free Windows Admin Tool Kit Click here and download it now
July 1st, 2009 2:17am

I know its an old thread, but I'm interested in using SDCLT.exe in a Backupscript. But I can't find any documentation about the parameters for SDCLT BACKUP in the internet. I hope you can help me? Here's a scriptsample with robocopy (i will use sdclt instead): :: Datum und Zeit auslesen for /f "Tokens=1,2,3 Delims=. " %%i in ('date /t') do set dt=%%k%%j%%i for /f "Tokens=1,2 Delims=: " %%i in ('time /t') do set tm=%%i%%j set logfile=d:\Backup\Log\%dt%FullUsbBKP.log set mailto=informatik@xx.ch set subject="Vollsicherung auf USB" set from=%COMPUTERNAME%@%USERDNSDOMAIN% set server=service set workdir=d:\Backup\ set jobname=BKP auf USB ::Laufwerksbuchstabe der USB-Platte erfragen @echo Bitte geben Sie den Laufwerksbuchstaben der USB-Festplatte ein (ohne Doppelpunkt!): set /p laufwerk= ::Erstellen des Log.Kopfes echo %DATE% %TIME% %COMPUTERNAME% %jobname% >> %logfile% for /f %%i in ('echo %time%') do set startzeit=%%i ::Kopieren Datenablage set folder=DatenAblage echo %DATE% %TIME% %COMPUTERNAME% %jobname% %folder% RoboCopy starten >> %logfile% robocopy D:\Sicherungsdaten\%folder% %laufwerk%:\%dt%VS\%folder% /E /R:2 /W:1 call %workdir%_robocopy_errorlevel %ERRORLEVEL% %logfile% %folder% ::Kopieren OpaccOne set folder=OpaccOne echo %DATE% %TIME% %COMPUTERNAME% %jobname% %folder% RoboCopy starten >> %logfile% robocopy D:\Sicherungsdaten\%folder% %laufwerk%:\%dt%VS\%folder% /E /R:2 /W:1 call %workdir%_robocopy_errorlevel %ERRORLEVEL% %logfile% %folder% ::Kopieren SBS set folder=SBS echo %DATE% %TIME% %COMPUTERNAME% %jobname% %folder% RoboCopy starten >> %logfile% robocopy D:\Sicherungsdaten\%folder% %laufwerk%:\%dt%VS\%folder% /E /R:2 /W:1 call %workdir%_robocopy_errorlevel %ERRORLEVEL% %logfile% %folder% ::Kopieren Profile set folder=Profile echo %DATE% %TIME% %COMPUTERNAME% %jobname% %folder% RoboCopy starten >> %logfile% robocopy D:\Sicherungsdaten\%folder% %laufwerk%:\%dt%VS\%folder% /E /R:2 /W:1 call %workdir%_robocopy_errorlevel %ERRORLEVEL% %logfile% %folder% ::Kopieren kleinere und neure Ordner set folder=Sicherungsdaten echo %DATE% %TIME% %COMPUTERNAME% %jobname% alle nicht spezifizierten Ordner RoboCopy starten >> %logfile% robocopy D:\%folder% %laufwerk%:\%dt%VS /XD D:\Sicherungsdaten\Datenablage /XD D:\Sicherungsdaten\OpaccOne /XD D:\Sicherungsdaten\SBS /XD D:\Sicherungsdaten\Profile /XD D:\Sicherungsdaten\vRanger /XD D:\Sicherungsdaten\Macdaten /E /R:2 /W:1 call %workdir%_robocopy_errorlevel %ERRORLEVEL% %logfile% %jobname% ::Kopieren vRanger set folder=vRanger echo %DATE% %TIME% %COMPUTERNAME% %jobname% %folder% RoboCopy starten >> %logfile% robocopy D:\Sicherungsdaten\%folder% %laufwerk%:\%dt%VS\%folder% /E /R:2 /W:1 call %workdir%_robocopy_errorlevel %ERRORLEVEL% %logfile% %folder% ::Kopieren Macdaten set folder=Macdaten echo %DATE% %TIME% %COMPUTERNAME% %jobname% %folder% RoboCopy starten >> %logfile% robocopy D:\Sicherungsdaten\%folder% %laufwerk%:\%dt%VS\%folder% /E /R:2 /W:1 call %workdir%_robocopy_errorlevel %ERRORLEVEL% %logfile% %folder% ::Erstellen des Log.Fusses for /f %%i in ('echo %time%') do set endzeit=%%i echo Kopierdauer für %jobname% von %startzeit% bis %endzeit% >> %logfile% ::Mail versenden echo %DATE% %TIME% %COMPUTERNAME% %jobname% Mail versenden >> %logfile% %workdir%\blat %logfile% -to %mailto% -subject %subject% -f %from% -server %server%
November 12th, 2010 2:20am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics