473,322 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Check directory/file protection?

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

Oct 18 '05 #1
3 1812
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>

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

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

Bill.
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.242...
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>

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 28 '05 #3
Bill wrote on 28 okt 2005 in microsoft.public.inetserver.asp.general:
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.242...
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>

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.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 28 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Dino | last post by:
dear all, i've created an application for a customer where the customer can upload ..csv-files into a specified ftp-directory. on the server, a php-script, triggered by a cronjob, reads all the...
2
by: Mike | last post by:
I want to exempt an entire subdirectory "/help" from the need for FormsAuthentication. How can I do it? I am using .Net FormsAuthentication to require login to all non member pages in my...
4
by: SoulSniper | last post by:
Hi, I have been stuck on this for a few days now and have given up trawling through pages and pages of google results.. I'm just putting the finishing touches to a small game I've written....
1
by: dotnetprogram | last post by:
I have a web application in the parent directory(http://localhost/). it has a web.config setting as follows: <authentication mode="Forms"> <forms loginUrl="Login.aspx" name="UserToken"...
3
by: david | last post by:
Hi, I have a asp.net site running on an MS Access database this is, for better or worse, stored under the webroot. How can I lockout the database directory to prevent anyone from...
0
by: COHENMARVIN | last post by:
I have a web site where I put my asp.net application in a folder called /asp.net/hotelallocation. I want it to be protected by a password, so I put a web.config file in that folder. But now when...
9
by: Benny Ng | last post by:
Hi,all, How to let the sub-directory to avoid the authentication control from Root's webconfig? I heard that we can add a new web.config to the sub-directory. And then we can slove the problem....
4
by: tshad | last post by:
I have a site www.stf.com and a site www.stfstage.com (where I do all my testing). The problem is that www.stfstage.com is only internal and I need to get access from the outside (without...
16
by: rogerjames1 | last post by:
How would I go about protecting a whole directory, e.g. http://www.example.com/members/ and all sub-directories with login protection? I wouldn't like to put a .php script in each directory and...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.