Hi and welcome to the board.

It depends on how you want the script to run.
If you want it to run as a logon script then you could have issues with one computer having the file open for writing all other computers will fail to open the file because it is already open.
If you run it as a remote admin script you could just check each computer one by one. It is recommended to add a method to check if the computer is online before checking if the file exists. You could use the ping udf for this purpose. Just do a search for ping in the udf forum and it will show up.

As a logon script (beware of the open issues):
Code:

Break on

$rc = Open (1, "\\server\share\logfile.txt" ,5)

If Exist ("c:\somefile.ext")
$line = ReadLine (1)
If InStr ($line, @WKSTA) = 0
$rc = WriteLine (1, @WKSTA + "~")
Else
?"Computer is already in the log file."
EndIf
EndIf

$rc = Close (1)



As a remote admin script:
Code:

Break on

$rc = Open (1, "\\server\share\logfile.txt" ,5)

$computers = Split("comp1~comp2~comp3~comp4~comp5", "~")

For Each =$computer in $computers
If Exist ("\\" + $computer + "\c$\somefile.ext")
$line = ReadLine (1)
If InStr ($line, $computer) = 0
$rc = WriteLine (1, $computer + "~")
Else
?"Computer is already in the log file."
EndIf
EndIf
Next

$rc = Close (1)

_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.