1.

Solve : Batch file for running a program with user inputs?

Answer»

Dear all,

Im pretty new to batch scripting.
So i wanted to execute a program with user inputs. Below is a typical

Program to be run:

c:/windows/programs/blabla.exe [starttime] [endtime] [filename]

Can anyone HELP me with this.

CheersCan you explain further?'starttime' 'endtime' and 'filename' will be entered by the user who is running the script.

So the program should ask the user for starttime, endtime and the filename and it runs the command line in the above MENTIONED format.

Hope i helped in clarifying my query.

Cheersstarttime and endtime will be in the format ddmmhhmmss. i think the script can just treat it as a text.This may WORK for you:

Code: [Select]@echo off
for %%a in (1 2 3) do set "var%%a="
set /p "var1=Enter Start TIME: "
set /p "var2=Enter End time: "
set /p "var3=Enter FIlename: "
"c:\windows\programs\blabla.exe" %var1% %var2% "%var3%"Thanks mate!



Discussion

No Comment Found