Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default Detect Directory

    Is there any way to detect the fully qualified directory that the
    requesting file resides in. For example, if my page was
    [url]www.mysite.com/detect.cfm[/url], it could return something like
    c:\inetpub\wwwroot\mysite\detect\ ?

    I'm trying to put together a simple installation script, and I figure
    having this auto-detected would save a lot of hassle having to ask the
    host for the fully-qualified path.

    Thanks for any help in advance

    LB
    LB Guest

  2. Similar Questions and Discussions

    1. change into a directory to create other folders/directory
      I need to create sub folders in a parent folder.. i have ... <cfset session.parentdir = "e:\mainstuff\"> <cfdirectory action="create"...
    2. Active Directory Search fails ("The directory service is unavailab
      Hi all, I'm having one of those nerve wrecking errors, when trying to perform a simple search in an Active Directory. The objective of the code...
    3. Server cannot access application directory ... The directory does not exist or is not accessible because of security settings
      If you are using Windows XP in a Workgroup, rather than a Domain, then by default "Simple Filesharing" is turned on, and you won't see a security...
    4. Server cannot access application directory... The directory does not exist or is not accessible because of security settings.
      Hi, I have this issue with the error below. Let me explain my goal and my server environement: Goal: To have 3 separate web servers reading...
    5. rsync exclude file - directory name without directory contents
      When using rsync to maintain incremental backups significant space can be saved on the backup server by excluding directories that have non-critical...
  3. #2

    Default Re: Detect Directory

    LB wrote:
    > Is there any way to detect the fully qualified directory that the
    > requesting file resides in. For example, if my page was
    > [url]www.mysite.com/detect.cfm[/url], it could return something like
    > c:\inetpub\wwwroot\mysite\detect\ ?
    >
    > I'm trying to put together a simple installation script, and I figure
    > having this auto-detected would save a lot of hassle having to ask the
    > host for the fully-qualified path.
    >
    > Thanks for any help in advance
    >
    > LB
    Answering my own post here for the benefit of anyone else that may be
    interested, found the solution as follows;

    You can find the fully qualified path of the CF template using
    CGI.CF_TEMPLATE_PATH.

    Then do a replaceNoCase(CGI.CF_TEMPLATE_PATH,MyTemplate.cfm, "")
    to eliminate the name of the template.

    LB
    LB Guest

  4. #3

    Default Re: Detect Directory

    > Answering my own post here for the benefit of anyone else that may be
    > interested, found the solution as follows;
    >
    > You can find the fully qualified path of the CF template using
    > CGI.CF_TEMPLATE_PATH.
    >
    > Then do a replaceNoCase(CGI.CF_TEMPLATE_PATH,MyTemplate.cfm, "")
    > to eliminate the name of the template.
    >
    > LB
    Just adding to this(!), found an easier route is to simply use;

    GetDirectoryFromPath(CGI.cf_template_path)

    Sorry!
    LB Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139