Check directory/file protection?

Discussion in 'ASP General' started by Bill, Oct 18, 2005.

  1. Bill

    Bill Guest

    Using ASP in a VBScript environment, how can I check the protection on a directory, or a
    particular file?
     
    Bill, Oct 18, 2005
    #1
    1. Advertising

  2. Bill

    Evertjan. Guest

    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)
     
    Evertjan., Oct 18, 2005
    #2
    1. Advertising

  3. Bill

    Bill Guest

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

    Bill.


    "Evertjan." <> wrote in message
    news:Xns96F3EE53984F2eejj99@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)
    >
     
    Bill, Oct 28, 2005
    #3
  4. Bill

    Evertjan. Guest

    Bill wrote on 28 okt 2005 in microsoft.public.inetserver.asp.general:
    > "Evertjan." <> wrote in message
    > news:Xns96F3EE53984F2eejj99@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)
     
    Evertjan., Oct 28, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raj
    Replies:
    0
    Views:
    446
  2. g
    Replies:
    69
    Views:
    2,224
    Oliver Wong
    Apr 25, 2006
  3. Javier

    check memory protection

    Javier, Aug 21, 2007, in forum: C Programming
    Replies:
    3
    Views:
    433
    Keith Thompson
    Aug 21, 2007
  4. Richard Maher
    Replies:
    16
    Views:
    1,266
    Joshua Cranmer
    Sep 21, 2009
  5. nano2k

    File protection between webservice calls

    nano2k, Jan 22, 2007, in forum: ASP .Net Web Services
    Replies:
    4
    Views:
    165
    nano2k
    Jan 24, 2007
Loading...

Share This Page