Check directory/file protection?

B

Bill

Using ASP in a VBScript environment, how can I check the protection on a directory, or a
particular file?
 
E

Evertjan.

Bill wrote on 18 okt 2005 in microsoft.public.inetserver.asp.general:
Using ASP in a VBScript environment,

I suppose VBscript on an ASP platform?
how can I check the protection on
a directory, or a particular file?

<%
file = "myDir/theFile.txt"
set fso = CreateObject("Scripting.FileSystemObject")
if fso.fileExists(server.MapPath("/" & file)) then
response.write "exists."
else
response.write "does not exist."
end if
set fso = nothing
%>

from: <http://www.aspfaq.com/show.asp?id=2351>
 
B

Bill

Well, that tells me if it exists, but it doesn't return the directory/file protection,
does it?

Bill.
 
E

Evertjan.

Bill wrote on 28 okt 2005 in microsoft.public.inetserver.asp.general:
Well, that tells me if it exists, but it doesn't return the
directory/file protection, does it?

I don't think you can get that, exept by trial and error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top