View Full Version : filesystemobject
While modifying the txt file through the filesystemobject I got this error
Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied
/test/filesystemobject/filesystem.asp, line 63
Can you post the code you use for the fso operaions ?
This is my code
<%
Set fs=Server.CreateObject("Scripting.FileSystemObject")
set t=fs.OpenTextFile(Server.MapPath("/test/countryname1.txt"),8,true)
t.WriteLine("This text will be added to the end of file")
t.Close
set fs=nothing
%>
Is it required to give permission to particular file or folder and if yes then how?
You indeed need to have write permissions.
I assume this file is on a server somewhere. If you're the admin, assign write permission to this file.
If it's not your own server, ask the admin to assign write permission to this file (or the folder), or to create a folder ('db') with write permissions or move the textfile over to that folder.
Most hosts that support use of database crate a db-folder for there users, so it's probably best to store the txt-file there.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.