Good Morning to ALL.

I have used the ReadFileTail function and it works great. My problem starts when i'm trying to use the script on my DC.
I have tried the script on my local machine and everything works well then i copied the script to the DC and made the relevant changes and it doesn't read the lines in the file. It seems that there is problem reading from this particular file since it works on a different file. The file i wanr to read from is a regular log file with the archive attribute.

here are the relevan code lines:

 Code:
$text = ReadFileTail ("N:\RetalixLogs\datam.log", 10)
WriteFile ("N:\RetalixLogs\DataCheck.txt", $text)
PrintTo2 ("N:\RetalixLogs\DataCheck.txt","\\dc\OkiSvn")


I'm trying to read the 10 last lines from the 'datam.log' file and to write them into the 'DataCheck.txt' file and to print it.
As i mentioned at the begining with defferent files it works great, any suggestions will be appriciated.