441 |
10 Aug 06 |
jari |
1 |
@echo off |
441 |
10 Aug 06 |
jari |
2 |
rem |
441 |
10 Aug 06 |
jari |
rem inp2var.bat |
441 |
10 Aug 06 |
jari |
4 |
rem |
441 |
10 Aug 06 |
jari |
5 |
|
1916 |
31 Aug 07 |
jari |
rem Copyright (C) 2006 Jari Hakkinen, Olle Mansson |
441 |
10 Aug 06 |
jari |
7 |
rem |
441 |
10 Aug 06 |
jari |
rem Files are copyright by their respective authors. The contributions to |
441 |
10 Aug 06 |
jari |
rem files where copyright is not explicitly stated can be traced with the |
441 |
10 Aug 06 |
jari |
rem source code revision system. |
441 |
10 Aug 06 |
jari |
11 |
rem |
441 |
10 Aug 06 |
jari |
rem This file is part of Proteios. |
441 |
10 Aug 06 |
jari |
rem Available at http://www.proteios.org/ |
441 |
10 Aug 06 |
jari |
14 |
rem |
441 |
10 Aug 06 |
jari |
rem Proteios is free software; you can redistribute it and/or |
441 |
10 Aug 06 |
jari |
rem modify it under the terms of the GNU General Public License |
441 |
10 Aug 06 |
jari |
rem as published by the Free Software Foundation; either version 2 |
441 |
10 Aug 06 |
jari |
rem of the License, or (at your option) any later version. |
441 |
10 Aug 06 |
jari |
19 |
rem |
441 |
10 Aug 06 |
jari |
rem Proteios is distributed in the hope that it will be useful, |
441 |
10 Aug 06 |
jari |
rem but WITHOUT ANY WARRANTY, without even the implied warranty of |
441 |
10 Aug 06 |
jari |
rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
441 |
10 Aug 06 |
jari |
rem GNU General Public License for more details. |
441 |
10 Aug 06 |
jari |
24 |
rem |
441 |
10 Aug 06 |
jari |
rem You should have received a copy of the GNU General Public License |
441 |
10 Aug 06 |
jari |
rem along with this program; if not, write to the Free Software |
441 |
10 Aug 06 |
jari |
rem Foundation, Inc., 59 Temple Place - Suite 330, |
441 |
10 Aug 06 |
jari |
rem Boston, MA 02111-1307, USA. |
441 |
10 Aug 06 |
jari |
29 |
|
441 |
10 Aug 06 |
jari |
30 |
rem |
441 |
10 Aug 06 |
jari |
rem Sets specified environment variable to input value |
441 |
10 Aug 06 |
jari |
32 |
rem |
1044 |
05 Dec 06 |
olle |
rem Usage: inp2var.bat var_name [promptfile [mask_input|no_input|no_input_convert_backslashes]] |
441 |
10 Aug 06 |
jari |
34 |
rem |
441 |
10 Aug 06 |
jari |
rem Runs Java file Input2File.class with input arguments |
441 |
10 Aug 06 |
jari |
rem for output batch file, input variable name, prompt file |
441 |
10 Aug 06 |
jari |
rem (file with prompt text), and options. The output batch |
441 |
10 Aug 06 |
jari |
rem file will contain a command that sets the specified |
441 |
10 Aug 06 |
jari |
rem environment variable to the input value by executing |
441 |
10 Aug 06 |
jari |
rem (calling) the output batch file. |
441 |
10 Aug 06 |
jari |
41 |
rem |
441 |
10 Aug 06 |
jari |
rem If a third argument equal to the string "mask_input" |
441 |
10 Aug 06 |
jari |
rem (without quotation marks) exists, the input will be masked. |
441 |
10 Aug 06 |
jari |
44 |
rem |
441 |
10 Aug 06 |
jari |
rem If a third argument equal to the string "no_input" |
441 |
10 Aug 06 |
jari |
rem (without quotation marks) exists, the user will not be |
441 |
10 Aug 06 |
jari |
rem asked for input, but the text string in the prompt file |
441 |
10 Aug 06 |
jari |
rem will be used as input. In this case the program works as |
441 |
10 Aug 06 |
jari |
rem a simple support routine helping to set an environment |
441 |
10 Aug 06 |
jari |
rem variable to the value stored in the prompt file. |
441 |
10 Aug 06 |
jari |
51 |
rem |
1044 |
05 Dec 06 |
olle |
rem If a third argument equal to the string "no_input_convert_backslashes" |
1044 |
05 Dec 06 |
olle |
rem (without quotation marks) exists, the program will function |
1044 |
05 Dec 06 |
olle |
rem as for "no_input", except that all backslashes "\" will be |
1044 |
05 Dec 06 |
olle |
rem exchanged for slashes "/". Used to convert Windows directory |
1044 |
05 Dec 06 |
olle |
rem notation to web-standard directory notation, e.g. "C:\extra" |
1044 |
05 Dec 06 |
olle |
rem is exchanged for "C:/extra". |
1044 |
05 Dec 06 |
olle |
58 |
rem |
441 |
10 Aug 06 |
jari |
rem Used programs/files: |
441 |
10 Aug 06 |
jari |
60 |
rem |
441 |
10 Aug 06 |
jari |
rem inp2var.jar |
441 |
10 Aug 06 |
jari |
62 |
rem |
441 |
10 Aug 06 |
jari |
63 |
|
441 |
10 Aug 06 |
jari |
64 |
java -jar inp2var.jar inp_tmp.bat %1 %2 %3 |
441 |
10 Aug 06 |
jari |
65 |
rem |
441 |
10 Aug 06 |
jari |
rem Call created bat file to set value of variable %1 |
441 |
10 Aug 06 |
jari |
67 |
rem |
441 |
10 Aug 06 |
jari |
68 |
call inp_tmp.bat |
441 |
10 Aug 06 |
jari |
69 |
rem |
441 |
10 Aug 06 |
jari |
rem Delete temporary bat file after variable value is set |
441 |
10 Aug 06 |
jari |
71 |
rem |
441 |
10 Aug 06 |
jari |
72 |
del inp_tmp.bat |
441 |
10 Aug 06 |
jari |
73 |
rem |
441 |
10 Aug 06 |
jari |
rem If existing, delete promptfile |
441 |
10 Aug 06 |
jari |
75 |
rem |
441 |
10 Aug 06 |
jari |
76 |
if not "%2"=="" del %2 |
441 |
10 Aug 06 |
jari |
77 |
|