Thanks for your reply Maarten!

Actually the whole thing is a part of a bigger script, so "Folders.txt" is in a folder that is shared with the name "log$", so there is no problem with permissions.
The reason for using @LSERVER is that I don't have any DC's.
The script is used in a school with only one NT4 PDC, and the school is so small that they won't need a BDC.

There seemed to be a problem in the line:
use $drive: $resource
so I removed the : and added this line:
$drive = $drive + ":"
After that it worked (more or less).

Thanks again!

regards
Frippe