In another universe, someone I know here once asked:
> So, I have written a batch file, and it works fine from the CMD.EXE prompt.
>
> However, one of the users doesn't like the prompt and wants to run it by
> double-clicking. But the batch file needs a parameter (%1).
>
> Is there any way to make the script put up a GUI window and prompt for that
> parameter (if it detects that %1 is empty) ?
Sure enough, an example:
:: awk.cmd - beware wordwrap...
:: look for tool 'Winput' at <
http://www.horstmuc.de/w32dial.htm>
:: (others utilities of interest there too...)
@echo off
:: accumulate output...
for /f %%x in ('winput "title here" $input "please enter path to file"') do set VAR=%%x
:: parse %VAR%...
gawk.exe -f report.awk < %VAR%
:: *bonus points* see also 'sh2exe' <
https://sourceforge.net/projects/sh2exe/>
:: (bundles busybox, ash, awk, & your sh script into a single win exe...)
::
:: eof
--
Mike Sanders
www.peanut-software.com