Get the name/path of current .cfm file...

I'll make a script of "tracking" for a Web site.  My idea is to add a < CFINCLUDE > to each server the .cfm file (at the very end, it would be easier to remove when im done), and have the included script add a record to a database containing the path/file name of the .cfm file.  for example, index.cfm will include trackscript.cfm, and after the treatment the index.cfm a database will be a record in this container path/name of the file to index.cfm.

I'm new to coldfusion, but I think that I got it, except on the way to get the name of the file that will be added to the database.  is there some kind of function or variable available that will give me the name of the file running .cfm?

GetCurrentTemplatePath() will give you the absolute path of the current CFM file.

Tags: ColdFusion

Similar Questions

  • How to get the full path of the image open in a filter plugin file?

    Hello

    How to get the full path of the current file, including the directory, the file name with the extension. I need information to download the file on a webserver for a plugin. I found an example that can get the name of the document (title property) but without extension and directory. How can they?

    James

    There is no way to get the full path of the active document in a plug-in filter. A plugin automation has access to this information and the file format plug-ins.

  • Get the name of the current stage of MainSequence in parallel sequence

    Hello

    I starts a sequence in parallel of the MainSequence by "use new run." This parallel sequence is constantly in querying CPU performance data for my USE and records 'on the fly' an Excel file while the MainSequence turns the test scenario.

    To get a clear reference of the performance of the CPU DUT to test steps, I need to somehow get the name of the step of the test step currently performed in the MainSequence for saving it and the CPU performance data.

    Is it possible to identify the current stage of the main sequence in the parallel sequence (for example, property)?

    Thanks in advance,

    MRet

    Rette01 wrote:

    Hi Doug,.

    Finally, we have updated to TestStand 2013 and try to use your example.

    We have some problems to get the referral of wire, which is replaced by "threadToMonitor" in the expression you have posted, as far as I understand.

    The thread to monitor is the MainSequence. So, how can I get a reference to the MainSequence?

    Kind regards

    Rette01

    Pass RunState.Thread as a parameter to the call of the sequence. The parameter must be specified as an object reference variable.

    -Doug

  • How to get the default path of the data of a table space file

    I used below the sql statement to create a table space:

    CREATE A TABLESPACE DATAFILE AAA BBB SIZE 10 M AUTOEXTEND OFF...

    Notice, I do not give a full path instead of a file name, and then ask questions relevant to tables

    get the full path of the data file, assume that it's path below:

    d:\oracle\...\BBB

    So I don't think that there is a default path that oracle can use it to create the data file. My question

    is how to get this default path before creating a table space.

    Thank you very much.

    Hello

    I did similar simulations for you, then it could be seen easily:

    SQL > Show parameter db_create_file_dest

    VALUE OF TYPE NAME

    ------------------------------------ ----------- ------------------------------

    db_create_file_dest chain

    SQL > SELECT NAME, VALUE OF V$ PARAMETER

    2 where lower (name) = "db_create_file_dest;

    NAME

    --------------------------------------------------------------------------------

    VALUE

    --------------------------------------------------------------------------------

    db_create_file_dest

    It has the value NULL. Then where my datafile is going?

    SQL > create tablespace TEST datafile 'test01.dbf' size 10 M;

    Created tablespace.

    SQL > select file_name

    2 of dba_data_files

    3 where nom_tablespace = 'TEST ';

    FILE_NAME

    --------------------------------------------------------------------------------

    /U01/app/Oracle/product/12.1.0/Db_1/DBS/Test01.dbf

    When you check the alert logs, it will not show you the location of the data file. It will tell you what exactly you ran.

    ..

    ..

    Completed: drop tablespace test whose content and data files

    create tablespace datafile 'test01.dbf' size 10 M TEST

    Completed: create tablespace TEST datafile 'test01.dbf' size 10 M

    ..

    ..

    You can not SQL user * more? Well, I would say that, when you run the CREATE TABLESPACE command, is where you run the command:

    SQL > select file_name

    2 of dba_data_files

    3 where nom_tablespace = 'TEST ';

    FILE_NAME

    --------------------------------------------------------------------------------

    /U01/app/Oracle/product/12.1.0/Db_1/DBS/Test01.dbf


    So, you should get the location of your data file. Alternatively, you can run the query in the parameter $ v so that you know your default data file location.

    I hope this helps.

    Thank you.

    Kind regards

    Gaetan

  • Can ODI - I get the name of the file in a variable?

    Hello, I am trying to get the name of the folder (or subfolder) dynamically over the package that is currently running. I tried various API (from the Toolbox) calls including < % = odiRef.getSession("SESS_NAME") % >, but this isn't quite what I need.  I'm real new to ODI...

    I'm under ODI 11.1.1.6

    Thanks in advance.

    CL

    Yes, I think that this decision if more flexible. I use this way.

    . or you could hold information about the records in the table or XML file or a properties file and store it in the variable... It depends on your tasks and objectives

  • Is it possible to get the name of the folder that contains the current document?

    Hi all!


    I know how to get the name of the active document


    app.activeDocument.name;


    but I was wondering if you could also get the name of the folder that contains the current document. Not sure if this is possible or not, so I thought I'd ask, if so it save me a lot of time.


    Thanks in advance!

    Hi djbgraphicdesign,

    does this work for you?

    if (app.activeDocument.saved){
    alert(app.activeDocument.path.name);
    }
    

    Have fun

  • Get the names of palette file types

    Hello

    How can I get the names of all types of step programmatically in a palette file?

    In my view, it should be possible, but I tried different approaches using the poster of API reference and couldn't find a way.

    Thank you and best regards,

    Aditya

    TestStand 4.2.1

    LabVIEW 2009 SP1

    propertyObjFile.TypeUsageList.NumTypes

    propertyObjFile.TypeUsageList.GetTypeDefinition)

    typeaspropobj. TypeCategory is TypeCategory_StepTypes

    Hope this helps,

    -Doug

  • How to get the name or id of the screen currently displayed?

    I use UiApplication.getUiApplication () .getActiveScreen () to get the current active form. Is there a way to get the name of the current screen?

    You can extend the screen class and implement a getName() method. This will allow you to ask your screens for their name.

  • Get the name of the file attachment php form

    This should be simple enough, right? Gets the name of the file attached a form submission so I can insert it into a database.

    < input type = "file" name = "attached_file" class = "attached_file" >

    $attached_file = $_POST ['attached_file'];

    echo $attached_file;

    Pings above back squat diddly.

    See you soon

    Operating system

    In the files Panel, it should be tmp_name:

    $_FILES ['upload'] ['tmp_name'] / / where the download is the name of the field

  • Get the name of file that uses the file adapter

    Hello world.

    I know I can get the file name during playback of a file by clicking on properties and jca.filename and by setting a file name by going in the invoke properties when using 'Type' as an input. My question is, can we get the name of the file that the file adapter is used when you specify the file naming convention in the Setup Wizard. For example, you can have the file adapter use filenames like "MyFile%yyMMddHHmmssSSz%.txt". I want to get this information from the file adapter. I thought if the property jca.filename uses 'Type' as 'Input' assign names to files then surely 'Type' as 'exit' get the file name or a file adapter that writes a file, but of course it is not. Does anyone know if this can even be done?

    Thanks in advance.

    Hello

    You can perform a synchronization of read operation (without reading the content of the file) after writing the file in the same BPEL process, to get the name of the file that was written by the write operation.

    Thank you

  • get the name of the current workspace

    Hello
    is there a way to get the name of the current workspace?

    THX

    N °

    According to the Getter in the SDK plugin, it seems that you can get a list of workspaces, but NOT the name of the current workspace.

  • How to get the absolute path to a file in photoshop extended?

    Hello

    I try to send a file via an entry inside an extension of Photoshop. But how can I get the absolute path to this file inside the computer?

    Thanks in advance

    I don't know what you mean by sending a file. Do you want to open a file in PS or do I have to declare the path for support for the extension file? With javascript, you must define a variable. In Win it should look like:

    var file = new File('/c/images/myfile.psd');
    

    or

    var myScript = new File(app.path + '/Presets/Scripts/myJavascript.jsx');
    
  • Get the name of the report file in oracle running Report Builder

    Dear all,

    Is it possible to get the name of the report file in oracle running Report Builder?

    for example, "HR_REP012. REP.

    I need to this very important...

    Kind regards
    Yousef

    Published by: Yousef_m on June 2, 2012 05:18

    Hello

    Have you tried the builtin SRW. Built-in GET_REPORT_NAME?

    Example of

    function boolean return AfterPForm is
    my_variable varchar2 (80);
    BEGIN
    SRW. GET_REPORT_NAME ($my_var);
    SRW. MESSAGE (0,' report Filename = ' | my_variable);
    RETURN (TRUE);
    END;

    Concerning

  • Get the name of the file by the File/FTP adapter

    Hello

    I have a requirement in which I can manage the State of the files being processed by the file adapter. As the file adapter provides the ability to process files is the wild card, is there any way by which I can get the full name of the file.
    I have seen a few articles indicating that the ftp adapter can do but I could not file name, even using ftp adapter.


    Thanks in advance...

    Hello

    If you use the 11g, then you can make use of the property activities tab receive and use jca.ftp.fileName to get the name of the name of the file.

  • Can we get the name of the fmx file when running

    Hi all
    can we get the name of the fmx file that performs a DML operation on a specific table, we can back track which fmx module did DML on a specific table. The reason why I need it because I have 7 fmx different files that make a DML operation on a specific table and these fmx files are used by different users. Not necessarily 1:1 for example. a user can do DML through 3 fmx different files. So in this case if I want to want to know what FMX file that DML has take place. How can I achieve that. I know I can get the oracle via session username $ v, but it is not enough for my needs. I need also the name of the fmx file.

    I use:

    Forms [32 bit] Version 10.1.2.0.2 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    PL/SQL Release 10.2.0.1.0 - Production
    CORE 10.2.0.1.0 Production
    AMT for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production

    Any help?

    Best regards
    Percy

    Percy,

    For this, you can set the Module field in the V$ session in each form

    DBMS_APPLICATION_INFO.SET_MODULE(MODULE_NAME => :SYSTEM.CURRENT_FORM, ACTION_NAME => USER);
    

    Write this in every form, and you will get the name of the form in the module field in the V$ SESSION form name.

    I hope this helps.

    Kind regards

    Manu.

Maybe you are looking for