Page 1 of 1 1
Topic Options
#5922 - 2000-12-23 03:04 AM filtering command?
Anonymous
Unregistered


we have the usernames and other info being written to a text file on a server.
her is my script:
;*****Computer and user info saved to a file on the network***

USE X: "\\KINGAPPS1\PROFILES"
OPEN (1,"X:\logons\LOGON.TXT",5)
$MACADD=SUBSTR(@ADDRESS,1,2)+":"+SUBSTR(@ADDRESS,3,2)+":"+SUBSTR(@ADDRESS,5,2)+":"+SUBSTR(@ADDRESS,7,2)+":"+SUBSTR(@ADDRESS,9,2)+":"+SUBSTR(@ADDRESS,11,2)

WRITELINE(1,"|" +@wksta+"|"+@userid+"|"+@ipaddress0+"|"+$MACADD+"|"+@date+"|"+@time+chr(13)+chr(10))
BEEP
CLOSE (1)
USE X: /DEL

What we would like is for there to be a filtering command to be used with if/else so that we don't have multiple writtings of the same user with the same MAC address. Once we have a complete list we would like the list to not keep growing, but rather updating. Is there a way to do this?. we use excel to sort through the list, which is all we need and want to stay away from a dbf.

Thanks for the help in advance.

------------------
shawn

Top
#5923 - 2000-12-27 07:59 AM Re: filtering command?
Anonymous
Unregistered


Shawn,

Have you considered using an INI file format rather than a straight append to a text file.

That way you could READPROFILESTRING and WRITEPROFILE STRING to update the file but if the READPROFILESTRING fails to find an entry then do your append to the end of the file.

One slight problem you may have is if someone has the file open while somebody else is trying to access it.

It's just a thought, I'll try to think of a better solution for you though.

------------------
David Gray
IT Professional
Brisbane Australia
david.gray@suncorpmetway.com.au

Top
#5924 - 2000-12-27 11:31 AM Re: filtering command?
Anonymous
Unregistered


Hya Shawn..,

You could take a look at my 'Inventory.kix' and 'ProcessInventory.kix' scripts in my posting at http://kixtart.org/board/Forum2/HTML/000989.html

Feel free to use these scripts or parts of it. I think you would be interested in the 'PrecessInventory' script.

I you have any questions and/or remarks. please let me know by posting your reply here.

------------------
To Be Of Service..,
Fabian.
-----------------Paranoia is reality on a finer scale-----------------

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
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.05 seconds in which 0.024 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