|
 |
asp_web_howto thread: File delete problem
Message #1 by "sathish r" <sathish297@y...> on Thu, 15 Nov 2001 14:38:26 +0530
|
|
Hi ,
I'am trying to delete a text file residing at the server.
This is the detail:
----------------
1. The file "score.txt" is not readonly
2. The directory in which the file is stored is also not read only.
This is my code:
----------------
set fso=createobject("scripting.filesystemobject")
set f=fso.opentextfile (server.mappath("score.txt"),8,false)
This is my Error:
-----------------
Microsoft VBScript runtime error '800a0046'
Permission denied
Could anyne fnd out the cause and the solution?
With Regards,
sathish kumar R.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Thu, 15 Nov 2001 10:02:09 -0000
|
|
I have had a similar problem trying to over-write a file - it turns out that
the system needs to be the owner of the file. When I created and saved the
file manually, I was the "owner" of the file, and then even though the file
permissions were full control to everyone, I kept getting 'permission
denined'. However, if the file was created by the system then there was no
problem.
-----Original Message-----
From: sathish r [mailto:sathish297@y...]
Sent: 15 November 2001 09:08
To: ASP Web HowTo
Subject: [asp_web_howto] File delete problem
Hi ,
I'am trying to delete a text file residing at the server.
This is the detail:
----------------
1. The file "score.txt" is not readonly
2. The directory in which the file is stored is also not read only.
This is my code:
----------------
set fso=createobject("scripting.filesystemobject")
set f=fso.opentextfile (server.mappath("score.txt"),8,false)
This is my Error:
-----------------
Microsoft VBScript runtime error '800a0046'
Permission denied
Could anyne fnd out the cause and the solution?
With Regards,
sathish kumar R.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
$subst('Email.Unsub')
________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com
Headquarters Address & Contact Numbers
150 Broomielaw
5 Atlantic Quay
Glasgow
G2 8LU.
Tel: +44 (0) 141 248 2700.
Fax: +44 (0)141 221 3217
This message is sent in confidence for the addressee only.
It may contain legally privileged information. The contents are not to
be disclosed to anyone other than the addressee. Unauthorised recipients
are requested to preserve this confidentiality and to advise the sender
immediately of any error in transmission.
Message #3 by "Pat Waddington" <paw@s...> on Thu, 15 Nov 2001 11:10:09 -0000
|
|
You can't delete a file that is open. Try using GetFile instead of
OpenTextFile.
HTH
----- Original Message -----
From: "sathish r" <sathish297@y...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Thursday, November 15, 2001 9:08 AM
Subject: [asp_web_howto] File delete problem
> Hi ,
> I'am trying to delete a text file residing at the server.
>
> This is the detail:
> ----------------
>
> 1. The file "score.txt" is not readonly
> 2. The directory in which the file is stored is also not read only.
>
> This is my code:
> ----------------
>
> set fso=createobject("scripting.filesystemobject")
> set f=fso.opentextfile (server.mappath("score.txt"),8,false)
>
> This is my Error:
> -----------------
>
> Microsoft VBScript runtime error '800a0046'
>
> Permission denied
>
>
> Could anyne fnd out the cause and the solution?
>
> With Regards,
> sathish kumar R.
>
>
>
>
>
>
>
>
> _________________________________________________________
>
> Do You Yahoo!?
>
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>
>
$subst('Email.Unsub')
>
>
Message #4 by "Drew, Ron" <RDrew@B...> on Thu, 15 Nov 2001 11:34:18 -0500
|
|
http://www.4guysfromrolla.com/aspfaqs/ShowFAQ.asp?FAQID=108
-----Original Message-----
From: Alex Shiell, ITS, EC, SE [mailto:alex.shiell@s...]
Sent: Thursday, November 15, 2001 5:02 AM
To: ASP Web HowTo
Subject: [asp_web_howto] RE: File delete problem
I have had a similar problem trying to over-write a file - it turns out that
the system needs to be the owner of the file. When I created and saved the
file manually, I was the "owner" of the file, and then even though the file
permissions were full control to everyone, I kept getting 'permission
denined'. However, if the file was created by the system then there was no
problem.
-----Original Message-----
From: sathish r [mailto:sathish297@y...]
Sent: 15 November 2001 09:08
To: ASP Web HowTo
Subject: [asp_web_howto] File delete problem
Hi ,
I'am trying to delete a text file residing at the server.
This is the detail:
----------------
1. The file "score.txt" is not readonly
2. The directory in which the file is stored is also not read only.
This is my code:
----------------
set fso=createobject("scripting.filesystemobject")
set f=fso.opentextfile (server.mappath("score.txt"),8,false)
This is my Error:
-----------------
Microsoft VBScript runtime error '800a0046'
Permission denied
Could anyne fnd out the cause and the solution?
With Regards,
sathish kumar R.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
$subst('Email.Unsub')
________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com
Headquarters Address & Contact Numbers
150 Broomielaw
5 Atlantic Quay
Glasgow
G2 8LU.
Tel: +44 (0) 141 248 2700.
Fax: +44 (0)141 221 3217
This message is sent in confidence for the addressee only.
It may contain legally privileged information. The contents are not to be
disclosed to anyone other than the addressee. Unauthorised recipients are
requested to preserve this confidentiality and to advise the sender
immediately of any error in transmission.
---
You are currently subscribed to asp_web_howto as: RDrew@B... To
unsubscribe send a blank email to $subst('Email.Unsub')
|
|
 |