Passing data to a batch file

Currently eluding me at the minute.

I want to have a batch script that will run a backup command based on what I tell the script to.

SO in other words, I want to run the script and have the CMD window pop up and ask if I want a full or incremental backup and by typing in either F or I to get the right command to run.

Getting the command to run I imagine is a IF statement but how do I get the command window to ask the user what they want?

It might just be simpler to create 2 backup scripts I must admit:ghey:

To be interactive I think you will need to run something to grab the response. How about running it in the style
c:\backup -f
You can then check the presence and content in batch file easily. e.g. do nothing if none, maybe put up a help message saying you need to specify what mode you want.

Drez, Zip file attached.

This is something I did for work a while back for someone else, just added some choice parameters into it.

Unzip it using the folder structure, (should be c:\backup1).

In that you will have a 1 folder and 3 files
Folder: Original
Files: Runme.bat, Incremental.bat and Full.bat

Run the runme.bat

The files were originally created to retain certain files for 72 hours, and like I said I just added some parameters.

Hope it’s useful… (19.7 KB)

Cheers for that. It appears to be what I’m after.
Given me the data I need to use to create my own that will run when I need it.

Batch file scripts is your method needed which I assume is what’s supplied in the file above

Plenty of sites out there for learning that.

just one for info, its still handy to know.

Thanks for the link. Looks pretty comprehensive. Will have a better look on a bigger screen.

Sent from my Dell Streak using Tapatalk