1.

Solve : More than 9 "%" variables in batch file?

Answer»

Salmon Trout,
EXCELLENT!
I will copy your code and punt in my collection of things.

Thank you, Geek. I would have thought the script was a bit specialised, but it does show how to get at all the PARAMETERS (not sure of the effective limit, but it's many more than 9) without using SHIFT.

I noticed that when I posted the result of the batch that the output string lacked the leading quote mark. This was due to my careless copying; the quote is actually present in the output.

As it stands the string comparison that finds the department name is case-sensitive; I'll wait and see if the OP actually wants to try that code before changing that.
Quote from: Salmon Trout on March 16, 2014, 09:22:31 AM

REM Now parse out the LOCATION using a list
REM This one is hard coded in the batch
for %%A in (

(etc)

Of course that comment should read "parse out the department" (this is what the code actually does)
The application I'm using is call MarkVision. It is a Lexmark application for monitoring printers and such.
I'll take a look at the suggestions posted and let you know what I find.
I APPRECIATE all the help so far in this.

The other way I could remedy this is by making sure all printers have a TWO work identifier like "conference room". But as I expand this alert ability out I know I'm not going to be able to keep that up.

I'll be back in touch.Salmon Trout that is AWESOME. It worked like a charm!
The only hang up is if the "Department" is off just a little bit on the printer and not defined that way in the script. Then the information outputted is not quite correct. But this would just be a environment management task for me and something I can show to my techs why they need to put in the information correctly.

Thanks for all the help!


Discussion

No Comment Found