Batch Files

Well at work i am suppose to teach people how todo run a simple srting, but it would be a lot easier if i could write a simple batch file, problem is, is that i havn’t a clue (well i have a small one) of how to write it;

What i need is for it to ask for the filename (which is in the same folder)
When these have been inputted i need it to liturally run a prog in the same folder again that goes

ecplog filename -fRESULTS.txt -vgrrrd

then maybe a line at the bottom saying a file has been created called RESULTS.txt

Any help would be great!

Thanks Loads

sounds like a job for vbscripting rather than a batch file I think.


Very quick question, what are you running this script in (Excel, Word, etc) or where are you getting the data from?

This should work inside a DOS batch file:

@echo off
set /p filename="Enter a filename: "
echo you entered %filename%

Fantastic, It works! :smiley:

@echo off
set /p filename="Enter a filename: "

ecplog %filename% -fRESULTS.txt -vgrrrd

ECHO RESULTS.txt Has been created!


going to have to try to make another now, will post back if i get in trouble :slight_smile:


HAZAR i have even got one working for 2 inputs! THANKS loads Tom!

Right trying to create a basic menu for the batchs i have created now, trying to use the ‘IF’ commands but what command just cant seem to get it to run.

i have 6 options where each one will run a seperate BAT file (or if needed i could include that bat in this file for one HUGE bat)

thanks again

BTW - this is a command promt batch and its simple does progs which have already been written.

very helpful so Forget all my above posts :stuck_out_tongue: