Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Backup script

Posted on 2007-03-20
7
Medium Priority
?
225 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 1000 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to dynamically set the form action using jQuery.

704 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