1.

Solve : Another batch file question?

Answer»

I have another question about a BATCH file i made for backing up data. I want to set it so when executing the batch, it will prompt you to enter in the variable information in the command window. So at the moment there are 2 variables that would need to be entered as in the following script:
Quote

:: variables
set drive=E:\Backup
set backupcmd=xcopy /s /c /d /e /h /i /r /y
set PROFILE=c:\Documents and Settings\

So the variables that would be prompted to CHANGE are Set drive for the drive letter and folder destination. As in E: the drive letter and Backup being the name of the destination folder. And set profile would be the profile name at the end of Documents and settings. Any help would be appreciated. ThanksTry using the set statement:

set /p variable=promptString

variable is any arbitrary name
promptString is any string including SPACES (every character is used literally)





Discussion

No Comment Found