Found out the problem... second line should have read: $file = FileOpen("dc1deleteprofile$ProfilesToDelete.txt", 1) FileWriteLine($file, $username & @CRLF) FileClose($file) Cheers anyway. :-)
Hi guys,
I have a problem writing a file to unc paths. See my example:
$file = FileOpen(@ScriptDir & "\\dc1\deleteprofile$\ProfilesToDelete.txt", 1)
FileWriteLine(@ScriptDir & "\\dc1\deleteprofile$\ProfilesToDelete.txt", $username & @CRLF)
FileClose($file)
The file is not created or edited!
If I use local paths, the script works fine. I have checked permissions of the share & it is OK to write.
Any ideas anyone?