Solved

Backup script

Posted on 2007-03-20
7
224 Views
Last Modified: 2010-04-16
I would like to create a simple backup script to copy an OS image to an external drive at the end of each day. I know nothing about programming and very little about DOS. Ive searched here and other places but haven't found a solution yet. I've actually created a couple of scripts by reading about it but have not yet been successful with those scripts. At one time I found a VBS script used to create a restore point with just one click. That's what I'm hoping I can do with a backup script whether it's VBS or Batch.

Here's the scenario; Each day my imaging program will perform a full image of my OS and partition. At the end of each day I would like to copy that image to an external drive overwriting the previous days backup. It doesn't necessarily have to be scheduled I could start it manually with no problem. XP will is the OS.
0
Comment
Question by:mpcm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 96

Accepted Solution

by:
Lee W, MVP earned 250 total points
ID: 18761723
What you're asking for isn't really a script - it's more a simple command in a file named "something.cmd"

copy "x:\location\of\the\image\file\to\backup\filename.ext" "y:\location\on\external\drive"

0
 

Author Comment

by:mpcm
ID: 18763549
leew,
       I must be doing something wrong. I did as you said then checked file and it was not there. This is what I created: "e:\\BAT\BAT test file.txt" "g:\\BAT Backup" (exactly as presented) in Wordpad then saved it as Test Backup.cmd. I doubleclicked file, the command window flashed and was gone. I then checked the BAT Backup folder on g: drive and BAT test file was not there. I appreciate your help.
0
 

Author Comment

by:mpcm
ID: 18763597
After reading my post, I saw that I had entered command wrong. I omitted one of the backslashes on the g: drive. I ran command and still no file. New command:"e:\\BAT\BAT test file.txt" "g:\BAT Backup"
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 18764252
Why are you using e:\\... ?

it's a single slash only.  \\ is used to start a UNC - \\server\share... with drive letters, unless the command is special (and this one isn't), you always use single slashes.
0
 

Author Comment

by:mpcm
ID: 18765340
leew,
       Just an oversite on my part. I created another corrected .cmd file and it worked! Thanks for your help. Here is the final command for others who may want to do this. copy "e:\BAT\BAT test file.txt g:\BAT Backup.
0
 
LVL 96

Expert Comment

by:Lee W, MVP
ID: 18765559
No, that shouldn't work either - each path MUST be in quotes:
copy "e:\BAT\BAT test file.txt" "g:\BAT Backup"
0
 

Author Comment

by:mpcm
ID: 18766059
leew,
You are so right! All these details are a reminder of why I'm not a programmer.
Anyway thanks for your help......................
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question