Download the Tom's Hardware App from the App Store
The reference for current tech news
Yes No
Tom's Hardware > Forum > General UK & Ireland Discussions > Batch File Disk Backup utility

Batch File Disk Backup utility

Forum General UK & Ireland Discussions : Batch File Disk Backup utility

Word :    Username :           
 

hello i am making a batch file that backs up CDs to a certain hdd on my pc as its just a spare i have (40GB MAXTOR) and i want the thing to create a foldckuper i specifyon the drive for that certain backup using the XCOPY command

now here is the batch i have so far but i am not sure on how to code the folder option

@echo off
Mode Con Cols=45 Lines=1
XCOPY F:\ C:\CD1\ /E
exit

Now then i want the batch to allow me to tell it instead of "CD1" have whatever i type as the folder name but how do i do it?

i think you would use something like:

set /p web=Select Folder To Backup to:
if "%web%"=="...

Reply to ggbroughton
Register or log in to remove.

i just found out by myself lol. it is:

@echo off
:start
echo =========================
echo 1)--[ Backup A Disk ]--(
echo 2)--[ Move a File to the Disk ]--(
echo =========================
set /p Option=Select Option:
if "%Option%"=="1" goto Backup
if "%Option%"=="2" goto Restore
Goto start
:restore
set /p Folder=Select Folder:
Xcopy C:\%Folder%\ F:\ /E
goto Start
:Backup
set /p Folder=Select Folder:
CLS
Xcopy F:\ C:\%Folder%\ /E
goto Start

Reply to ggbroughton
Tom's Hardware > Forum > General UK & Ireland Discussions > Batch File Disk Backup utility
Go to:

There are 911 identified and unidentified users. To see the list of identified users, Click here.

Please mind

You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

Add a reply Cancel
  • Ask the community now
  • Publish
Ad
Latest best answer
How do i select the best answer in a thread?
By mcnumpty23, 78 days ago:

if you started a discussion rather than a question with an answer there isnt a way--did...

Best offers
They won a badge
Join us in greeting them