#70963 - 2002-10-21 03:05 PM
Won't write to file. @error = 5
|
DarthBuck
Fresh Scripter
Registered: 2002-10-20
Posts: 7
|
code:
? @error
$inventoryFile = "s:\LN_inventory\inventory.txt" ? @error
IF OPEN (2,$inventoryFile,5) = 0 $x = WriteLine (2, @FullName) $x = CLOSE(2) ENDIF
? @error
I am having problems opening a file to write to. I had a more elaborite script than this, but for trouble shooting I broke it all the way down to this.
The ? @error are in there for trouble shooting. The output when this script is ran is: 0 0 5 It will not create the file, it will not open and write to the file. This is about the most basic writeline I can come up with. Yes the S:\ drive is mapped and there are correct permisions to write to the directory.
The really weird thing is that it was working for a while. I was creating the script and testing it on two machines. Then I went to test it on a third machine before I put it in the login script and it didn't work. Now it won't work on any machine. All machines are Win2K SP2.
Can some one tell me what the problem is?
D.
|
|
Top
|
|
|
|
#70966 - 2002-10-21 03:14 PM
Re: Won't write to file. @error = 5
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
checkout the UDF library: WriteLog2()
This code is already written for you. If you want to write your own, it can be used a guide. [ 21. October 2002, 15:15: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#70967 - 2002-10-21 04:29 PM
Re: Won't write to file. @error = 5
|
DarthBuck
Fresh Scripter
Registered: 2002-10-20
Posts: 7
|
Thank all you for your help. Once again I am a bone head. It was access rights. The users had read but not write. Thanks again.
D.
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 671 anonymous users online.
|
|
|