The basic jist of this is I that the script is reading in a text file that contains all of the computer names in the domain. Ideally what I would like for it to do is go through and validate if this file exists on the computer. If it does, I want it to write to this text file that say the computer name and if the file exists or not.

 Code:
 
Break on

Open(1,"SymForm.txt",2)

Do $Comp = ReadLine(1)
	$UNCComp = "\\"+$Comp

	If Exist("$UNCComp\C$\Program Files\SymForm API\SymStoreMod.dll")=1
		$ToWrite = $Comp+Chr(9)+"File Exists"
		Open(2, "\\servername\sharename\filename.txt", 5)
		WriteLine(2, $ToWrite + @CRLF)
		Close(2)
	Else
		$NoWrite = $Comp+Chr(9)+"File Does Not Exist"
		Open(2, "\\servername\sharename\filename.txt",5)
		WriteLine(2, $NoWrite + @CRLF)
		Close(2)
	EndIf

Until $Comp=""
Close(1)


There are few problems I am experiencing. For testing I typically start with one computer until the code appears to be correct. For some reason everytime I read the one computer name, it will create a valid return in the text file, but then create a new line with no computer name and say File does not exist. Then when I start to read in multiple computers it it throws off all of the records.

For some reason I can't wrap my head around why it isn't working. I am definately open to other ideas of how to validate that this file exist on all of the domain computers. Any suggestions are appreacatied.

Thanks!
Jeff