Re: Rename a file which held in server using asp by Evertjan
Evertjan
Wed Mar 05 02:37:45 CST 2008
wrote on 05 mrt 2008 in microsoft.public.inetserver.asp.general:
> Brynn, thanks for your replay.
> I change the code as per your suggestion. But it does not work.
> I mention the full path
> Fso.MoveFile("c:\\inetpub\\1.jpg", "c:\\inetpub\\2.jpg") is just for
> example.
> It is correctly Fso.MoveFile("c:\\inetpub\\wwwroot\\support\\1.jpg", "
> c:\\inetpub\\wwwroot\\support\\2.jpg");.
> And the asp file is also in the same folder.( "c:\\inetpub\\wwwroot\
> \support\\")
> When I use the code as
> Fso.MoveFile("c:\\inetpub\\wwwroot\\support\\1.jpg", " c:\\inetpub\
> \wwwroot\\support\\2.jpg").
This escaping the \ depends on your using ASP-JS or ASP-VBS.
> In my local machine it works properly.
> But when I use the same code as
> Fso.moveFile(Server.MapPath("/support/2.jpg"), Server.MapPath("/
> LiveSupport/3.jpg"));
> It does not works and print an error
>
> Error Type:
> Microsoft JScript runtime (0x800A0046)
> Permission denied
> /support/Changename.asp.
> Is it the problem of permission?. If yes , what can I do for allow
> the permission.
This is as it should be. The ASP user should not have permission to access
the whole of the c: hd. In an of-web environment you could change te
permission, but that is outside the ASP Topic.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)