Go Back   PCMech Forums > Help & Discussion > Computer Hardware

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 06-19-2004, 03:01 AM   #1
Member (8 bit)
 
Join Date: Sep 2003
Location: United Kingdom
Posts: 129
Send a message via AIM to Lloyd45
Backup Problem

OK, about a month back I lost all my data on my hard drive due to an error, and after scare the other day, even though it was fine, I decided that I will take a hard drive out of my other old PC (which has two HDDs) and place it in my new one, and every day/week or so back it up onto it automatically...

I found a post on the forums hoswing the code to make a batch file to do so, but if I run it from the WinRAR folder as stated backing up files from HDD C:/ to HDD G:/ when it gets to the winRAR part of the operation, it just seems to close and go away - ending up not backing up anything, but, if I back up from a folder on C:/ to another folder on C:/ it works perfectly

Heres the code Im using:

Quote:
XCOPY "C:\Documents and settings\kunwar\My Documents\USB BACK UP" "G:\Backup\SMCS" /y/i/s
RMDIR "G:\Backup" /s/q
winrar a -r -M5 -MD4096 -Y -O+ -PMIKE -EP -ac -vn -ep1 -agDD-MMM-YY -df "G:\backup.rar" "G:\Backup"
Thanks for any help
Lloyd45 is offline   Reply With Quote
Old 06-19-2004, 05:32 AM   #2
Member (10 bit)
 
Designer's Avatar
 
Join Date: Mar 2004
Location: Essex, UK
Posts: 982
Send a message via AIM to Designer Send a message via MSN to Designer
If my memory of M$-DOS serves me correctly then the first line of the batch file is wrong as it's not using standard length filenames (8 characters + 3 character extension).

Folders created with windows support longer filenames than MS-DOS does so in DOS to get the folder you want it's basically a case of only using the first 6 characters of the filename excluding spaces then normally ~1

try replacing the XCOPY line with:

XCOPY C:\Docume~1\kunwar\mydocu~1\USBBAC~1

I dont think you should be using the quotation marks either.

Hope this helps
__________________
Intel Core i7 920 2.66GHz | Asus P6T SE| 6GB Corsair ram | XFX Radeon HD 4780 | 2 x 250 Gb Maxtor SATA II (in RAID 0), 1 x 250GB SATA II | Creative XFI soundcard | Coolermaster 650W PSU | ThermalTake Tsunami case

My new website -Carp Fishing Forums
Designer is offline   Reply With Quote
Old 06-19-2004, 05:53 AM   #3
Member (8 bit)
 
Join Date: Sep 2003
Location: United Kingdom
Posts: 129
Send a message via AIM to Lloyd45
Thanks for the help

I think it was the quotation marks that you said about, I took them away and it worked - thanks again
Lloyd45 is offline   Reply With Quote
Old 06-19-2004, 05:58 AM   #4
Member (10 bit)
 
Designer's Avatar
 
Join Date: Mar 2004
Location: Essex, UK
Posts: 982
Send a message via AIM to Designer Send a message via MSN to Designer
No problem Lloyd45,

Found this, might be of interest to you:

http://goforit.unk.edu/msdos/msdos18.htm

It's a guide to writing batch files, think i've found stuff out from there before
Designer is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:54 AM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0