Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

backup files with batch job needing help.


  • Please log in to reply

#1
Bruinaholic

Bruinaholic

    Member

  • Member
  • PipPipPip
  • 162 posts
Hi I am trying to use a batch job in which I am backing up certain files and docs to my CD RW. I found a script to use but I am not sure of the correct syntax so it will back it up there. My D: drive is the destination drive. The following is the script I am using:



@echo off
:: variables
set drive=D:\Backup
set backupcmd=xcopy /s /c /d /e /h /i /r /y

echo ### Backing up My Documents...
%backupcmd% "%USERPROFILE%\My Documents" "%drive%\My Documents"

echo ### Backing up Favorites...
%backupcmd% "%USERPROFILE%\Favorites" "%drive%\Favorites"

echo ### Backing up email and address book (Outlook Express)...
%backupcmd% "%USERPROFILE%\Application Data\Microsoft\Address Book" "%drive%\Address Book"
%backupcmd% "%USERPROFILE%\Local Settings\Application Data\Identities" "%drive%\Outlook Express"

echo ### Backing up email and contacts (MS Outlook)...
%backupcmd% "%USERPROFILE%\Local Settings\Application Data\Microsoft\Outlook" "%drive%\Outlook"

echo ### Backing up the Registry...
if not exist "%drive%\Registry" mkdir "%drive%\Registry"
if exist "%drive%\Registry\regbackup.reg" del "%drive%\Registry\regbackup.reg"
regedit /e "%drive%\Registry\regbackup.reg"

:: use below syntax to backup other directories...
:: %backupcmd% "...source directory..." "%drive%\...destination dir..."

echo Backup Complete!
@pause

Can someone please help me out in achieving what I am trying to do. I would greatly appreciate any positive help.

thanks
  • 0

Advertisements


#2
Neil Jones

Neil Jones

    Member 5k

  • Member
  • PipPipPipPipPipPipPipPip
  • 8,476 posts
This isn't going to work, you can't just dump a bunch of files and folders to Drive D and expect them to appear on CD. They will not be written, you would need to use the CD Writing Wizard to actually put them on the CD, otherwise they'll just sit in a holding area.
  • 0

#3
Chopin

Chopin

    Member 2k

  • Member
  • PipPipPipPipPip
  • 2,639 posts
What he said. While DOS is super-cool, it would be REALLY hard for that to happen with a batch file.
  • 0

#4
Bruinaholic

Bruinaholic

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 162 posts
I have NERO. Is there a way to use that and a batch job to do a backup? If so, how please?
  • 0

#5
Bruinaholic

Bruinaholic

    Member

  • Topic Starter
  • Member
  • PipPipPip
  • 162 posts
I have NERO. Is there a way to use that and a batch job to do a backup? If so, how please?
  • 0

#6
Neil Jones

Neil Jones

    Member 5k

  • Member
  • PipPipPipPipPipPipPipPip
  • 8,476 posts
http://www.autohotke...m/topic964.html

Google is your friend.
  • 0

#7
dsenette

dsenette

    Je suis Napoléon!

  • Community Leader
  • 26,047 posts
  • MVP
http://club.cdfreaks...mpt-nero-68276/

i don't have nero so i can't test syntax for you but if you call the nero executable from a batch it will give you command line burn abilities.....

if you can find nerocmd.exe in the nero folder you could open a command prompt and type "<path to file>\nerocmd.exe /?" and it will probably give you the commands that it uses

then you'd probably construct your batch to copy your files to a destination folder, then execute nero to burn that folder to CD
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP