Solved

Backup script

Posted on 2007-03-20
7
219 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
  • 4
  • 3
7 Comments
 
LVL 95

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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 95

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 95

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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)

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now