Get current directory only?

Results 1 to 2 of 2

Thread: Get current directory only?

  1. #1
    SIN Guest

    Default Get current directory only?

    I&#039m trying to display the name of the directory my asp file is in. I can get the full path to the file by using this code:<BR><BR>filex=server.mappath("index.asp")<BR> Response.Write(filex)<BR><BR>but then I get a the full path to the file:<BR>G:web100001index.asp <BR><BR><BR>I need an output that gives me just the name of the dir my file is in ("100001" in this case).<BR>How would I do this?? Help would be appreciated VERY much!<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Get current directory only?

    &nbsp;<BR>filex=server.mappath(".")<BR><BR>use can use filesystem object to get the current dir name <BR>or<BR>just parse the current directory out of the return string<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts