Viktor,

no.

You have %1, %2 and so on and you can shift them if they're more than 10.

-------------8<--------------
To shift the parameters on the command line one position to the left, with the
%0 parameter being replaced by the %1 parameter and so on, type the following
in your batch file.

ECHO %0
.
.
.
ECHO %8
SHIFT
ECHO %9
.
.
.



As an example, assume:

%0 = 'round'
%1 = 'square'
%2 = 'flat'
%3 - %9 are empty


A SHIFT results in the following:

%0 = 'square'
%1 = 'flat'
%2 - %9 are empty


In the following batch file named PROCESS.CMD, you could use a file such as
this to call other processes and call on more than the 10 (%0 through %9)
variables that only batch-file processing allows. The file will process the
first batch file specified, and the SHIFT command will then move to the next
specified batch file. This allows you to specify the files to be processed in
any order that you want as well as vary the number of files to be processed.

@ECHO OFF
:CHECK
IF "%1" == "" GOTO DONE

ECHO PROCESSING THE FILE %1
CALL %1
SHIFT
GOTO CHECK

:DONE
ECHO PROCESSING COMPLETED


To process three files named FILE1, FILE6, and FILE2 using the batch file in
the previous example, enter the following at the command line:

PROCESS FILE1 FILE6 FILE2


The SHIFT results in the following:

PROCESSING THE FILE FILE1
(output of file1 if there is any...)
PROCESSING THE FILE FILE6
(output of file6 if there is any...)
PROCESSING THE FILE FILE2
(output of file2 if there is any...)
PROCESSING COMPLETED
------------->8--------------

Best regards.

Maurilio.

Viktor Szakáts wrote:
> Hi Maurilio, David,
> 
> Does OS/2 command interpreter supports %* to retrieve all 
> parameters passed to a batch file?
> 
> --- hello.cmd
> echo %*
> ---
> 
>>hello.cmd 1 2 3 4 5 6
> 1 2 3 4 5 6
> 
> Brgds,
> Viktor
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Harbour mailing list
> Harbour@harbour-project.org
> http://lists.harbour-project.org/mailman/listinfo/harbour

-- 
 __________
|  |  | |__| Maurilio Longo
|_|_|_|____| farmaconsult s.r.l.


_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to