1.

Solve : need batch file to ask for a filename?

Answer»

Hi all, I'm a NEWBIE re batch files etc so I need your help please.
I need a batch file to ask me for a file name see below:

Quote

REM for diagnosing minidump files
REM From the Kingston USB stick

@echo off

cd\Program Files\Debugging Tools for Windows

REM Ask for filename

What would I put here?


windbg -z K:\variable here? <-- need file name to be here
windbg> .logopen C:\debuglog.txt
windbg> .sympath

srv*C:\windows\symbols*http://msdl.microsoft.com/download/symbols
windbg> .reload;!analyze -v;r;KV;lmnt;.logclose;q

Exit
Quote
Hi all, I'm a newbie re batch files etc so I need your help please.
I need a batch file to ask me for a file name see below:

Quote
REM for diagnosing minidump files
REM From the Kingston USB stick

@echo off

cd\Program Files\Debugging Tools for Windows

REM Ask for filename

What would I put here?


windbg -z K:\variable here? <-- need file name to be here
windbg> .logopen C:\debuglog.txt
windbg> .sympath

srv*C:\windows\symbols*http://msdl.microsoft.com/download/symbols
windbg> .reload;!analyze -v;r;kv;lmnt;.logclose;q

Exit



Maybe a utility program would do what you need.

Check out:
http://short.stop.home.att.net/freesoft/batch1.htm
Look for : " INPUT — Get console input from within a batch file. " .

I HOPE that helps.



To get user input, use SET /P, eg

SET /P MyFileName=Which File ?

GrahamThanks for the replies, I am using a program called automate, does a LOT more than just batch files and is just what I need, but many thanks for the tips links and advice:

http://www.networkautomation.com/automate/


Discussion

No Comment Found