|
Hi everyone, i'm currently suffering a bit from writersblock while writing a kixfile that should read consecutively each line from a plain txt file, strip the last character away and dump the info into a resulting text file.
I've got the stripping and output sequence ready but i'm a bit lost as to figure out how many lines there are in the input text file. If i can determine that i can do an open file + a readline and retrieve each line that way. Can someone clarify this for me??
Here's the bit of code i already got.
$text="blablabla$" open(1,"f:\temp\test\dirs\result.txt",5) WriteLine( 1 , left($text,LEN($text) - 1) + @CRLF)
As soon as i figure out how many lines there are in the text file i can replace the "blablabla" string by the readline instruction.
The ultimate purpose is to retrieve a dir /b from all dirs in a certain directory and compare that info with the existing shares on a certain server. This is to check wether someone accidentally deleted a directory without removing the share first ( we are running a fileserver on a W2K cluster and this might cause serious problems when someone deletes a dir before removing the share. The parent resource can fail and cause a lot of interuptions.
Alternatively i could pull it off by calling the kix script from a batch routine and feeding it with an external variable like this. Sad thing is that i can't immediately find how to tell the script to accept this external parameter.
for /f %%i in ('type f:\temp\test\dirs\input.txt') do f:\temp\test\dirs\kix32 f:\temp\test\dirs\find.kix "parameter" [ 28. February 2003, 14:43: Message edited by: RobinHood ]
|