Page 1 of 1 1
Topic Options
#123945 - 2004-07-27 12:46 AM Wildcard
CrazyCunuk Offline
Lurker

Registered: 2004-07-27
Posts: 3
I am looking to see if it is possible to use wildcards when comparing the workstation name.

I am wishing to map a printer based on workstation name. But I want to do it dynamically. My naming scheme for computers will be static so I can easily track what facility the machine is located in and what department it belongs to. But if there are 4 in that department I dont want to have to modify my script every time those machines are swapped out. Here is an example:

Computer name : DAYADMIN01
Computer name : DAYADMIN02
Computer name : DAYADMIN03
Computer name : DAYADMIN04

I want to be able to add a printer to all of these machines based on DAYADMIN**

If this has been asked before I apoligize in advance, I must be searching with the wrong string as I have only turned up static array printer mapping so far.

Thank you for your help, any input is appreciated.

CrazyC

Top
#123946 - 2004-07-27 12:53 AM Re: Wildcard
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
try something like:
if "DAYADMIN"=left(@wksta,8)
"yep, starts with dayadmin..."
endif
_________________________
!

download KiXnet

Top
#123947 - 2004-07-27 03:15 AM Re: Wildcard
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Another approach (even though it could contain it) -

if INSTR(@wksta,"DAYADMIN")
"yep, contains dayadmin..."
endif

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#123948 - 2004-07-27 04:49 PM Re: Wildcard
CrazyCunuk Offline
Lurker

Registered: 2004-07-27
Posts: 3
Awsome thank you for your input. The INSTR command will do exactly what I want.

Thank you again.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.06 seconds in which 0.034 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org