Retrieve filename and insert in body of htm file?

Is there a way in Dreamweaver CS4 to retrieve the filename of the current file and insert it into the body? I want to accomplish the following:
retrieve: currentworkingfilename.htm
replace: href="constant/filename.htm">  (this is a consistent string that appears in all files)
with: href="currentworkingfilename.htm">
Thanks for any help with this.

You will need serverside script to achieve this. In PHP this would be $_SERVER["PHP_SELF"] as in
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<?php echo($_SERVER["PHP_SELF"]); ?>
</body>
</html>
Gramps

Similar Messages

  • Hi, extract data from xml file and insert into another exiting xml file

    i am searching code to extract data from xml file and insert into another exiting xml file by a java program. I understood it is easy to extract data from a xml file, and how ever without creating another xml file. We want to insert the extracted data into another exiting xml file. Suggestions?
    1st xml file which has two lines(text1.xml)
    <?xml version="1.0" encoding="iso-8859-1"?>
    <xs:PrintDataRequest xmlns:xs="http://com.unisys.com/Anid"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://com.unisys.com/Anid file:ANIDWS.xsd">
    <xs:Person>
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://com.unisys.com/Anid file:ANIDWS.xsd">
    These two lines has to be inserted in the existing another xml(text 2.xml) file(at line 3 and 4)
    Regards,
    bubbly

    Jadz_Core wrote:
    RandomAccessFile? If you know where you want to insert it.Are you sure about this? If using this, the receiving file would have to have bytes inserted that exactly match the number of bytes replaced. I'm thinking that you'll likely have to stream through the second XML with a SAX parser and copy information (or insert new information) as you stream with an XML writer of some sort.

  • Extract data from xml file and insert into another exiting xml fil

    hello,
    i am searching extract data from xml file and insert into another exiting xml file by a java program. I understood it is easy to extract data from a xml file, and how ever without creating another xml file. We want to insert the extracted data into another exiting xml file. Suggestions?
    Regards,
    Zhuozhi

    If the files are small, you can load the target file in a DOM document, insert the data from the source file and persist the DOM.
    If the files are large, you probably want to use a StAX or SAX.

  • For preparing the filenames and paths for the oracle database files..

    Hi,
    I am preparing the filenames and paths for the oracle database files.....but I am not able to complete this one...Will you Please help for filling this one.
    Controlfile ---- > select name from v$controlfile;
    Redologfile -- > select member from v$logfile;
    Datafile --------- > select tablespace_name,file_name from dba_data_files order by 1;
    Tempfile --------> select tablespace_name,file_name from dba_temp_files;
    Spfile -----------> show parameter spfile
    Pfile --------------->
    Passwordfile ---->
    tnsnames.ora -->
    listener.ora------>
    sqlnet.ora ------>
    oratab ------------->
    Thanks
    Shiju

    orashiju wrote:
    Hi,
    I am preparing the filenames and paths for the oracle database files.....but I am not able to complete this one...Will you Please help for filling this one.
    Controlfile ---- > select name from v$controlfile;
    Redologfile -- > select member from v$logfile;
    Datafile --------- > select tablespace_name,file_name from dba_data_files order by 1;
    Tempfile --------> select tablespace_name,file_name from dba_temp_files;
    Spfile -----------> show parameter spfile
    Pfile --------------->spfile and pfile are located under $ORACLE_HOME/dbs/
    Passwordfile ----> passwordfile is located under $ORACLE_HOME/dbs
    tnsnames.ora -->
    listener.ora------>
    sqlnet.ora ------>all above files are under $ORACLE_HOME/network/admin
    oratab ------------->depends on operating system. Usualy under /etc/oratab

  • Inserting filename and page numbers into multiple PDF files?

    Have since seen this thread, BUT still interested in the syntax of the code
    to insert filename and page # into multiple files:
    http://forums.adobe.com/thread/951925?tstart=0
    Good Evening (GMT!)
    I have approx 100 PDFs with one or two pages in each, they are English translations
    of Russian language test certificates and the formatting/feel of the originals is lost in
    the translations. The only real link between the two sources is the "_RUS" and "_ENG"
    filename suffixes and the common leading filenames otherwise. Thus I need to maintain
    a record of the filename in any page I print off, should there be a need to refer back to
    the original if the translation is open to artistic licence.
    I have a script (below) that happily adds a page x/y and filename into the active file,
    what I would like is to be able to do this insertion into multiple files as defined by a
    portfolio or a selection via a select files dialogue box
    I am quite out of my depth now as my past skirmishes with JavaScript have set
    cookies and tweaked a few other browser doodads in webauthoring
    Any help most appreciated on this one...
    Kind Regards
    Dr B
    Southampton
    UK
    NB the filename inserted may be corrupted as a result of my last tweakings
    will sort that one out ASAP....
    ================================
    // SetRemoveFooter
    // Modified as marked
    // Menu item generation
    app.addSubMenu({ cName: "Footer",cUser: "Set/Remove Complex Footer", cParent: "File", nPos: 20 });
    app.addMenuItem({ cName: "Set Filename", cParent: "Footer", cExec: "SetFooter(1)"});
    app.addMenuItem({ cName: " -> Set Date .... centered", cParent: "Footer", cExec: "SetFooter(2)"});
    app.addMenuItem({ cName: " -> Set Date .... right", cParent: "Footer", cExec: "SetFooter(3)"});
    //add page x of y
    app.addMenuItem({ cName: "Set Page ", cParent: "Footer", cExec: "SetFooter(4)"});
    app.addMenuItem({ cName: "Set Both", cParent: "Footer", cExec: "SetFooter(5)"});
    app.addMenuItem({ cName: "-------------------------------", cParent: "Footer",cExec: "{}"});
    app.addMenuItem({ cName: "Remove Both", cParent: "Footer", cExec: "RemoveFooter(5)"});
    app.addMenuItem({ cName: "Remove Date Time (Filename)", cParent: "Footer", cExec: "RemoveFooter(1)"});
    app.addMenuItem({ cName: "Remove Page", cParent: "Footer", cExec: "RemoveFooter(4)"});
    //=====================================================================================
    //Set/remove Footer
    function SetFooter(ARG)
    var re = /.*\/|\.pdf$/ig;
    var FileNM = + this.path.replace(re,"")+".pdf";
    var Path = this.path;
    var AcDate = new Date();
    var AcDateFormat = "dd/mm/yyyy"
    var Box2Width = 100
    for (var p = 0; p < this.numPages; p++)
    var aRect = this.getPageBox("Crop",p);
    var TotWidth = aRect[2] - aRect[0]
    if (ARG<=3 || ARG==5)
    {var fd = this.addField("xftDate", "text", p, [30,15, TotWidth-30-30,30]);
    //print output?
    fd.value = util.printd(AcDateFormat, AcDate) + " (" + FileNM +")";
    // TEXT SIZE SETTING
    fd.textSize=12; fd.readonly = true;
    if (ARG==1){ fd.alignment="left" };
    if (ARG==2){ fd.alignment="center" };
    if (ARG==3){ fd.alignment="right" };
    if (ARG==4 || ARG==5)
    {var bStart=(TotWidth/2)-(Box2Width/2)
    var bEnd=((TotWidth/2)+(Box2Width/2))
    var fp = this.addField(String("xftPage"+p+1), "text", p, [bStart,30,bEnd,15]);
    // print output?
    fp.value = "Page: " + String(p+1)+ "/" + this.numPages;
    // TEXT SIZE SETTING
    fp.textSize=12; fp.readonly = true;
    fp.alignment="center";
    //==========================================================================
    function RemoveFooter(ARG)
    if (ARG<=3 || ARG==5) {var x = this.removeField("xftDate");}
    if (ARG==2 || ARG==5) {for (var p = 0; p < this.numPages; p++)
    var x = this.removeField(String("xftPage"+p+1)); }
    will

    Putting this in a batch file within the automation function of Acrobat
    delivers the goods, I need to investigate the formatting of the output to
    get them to line up, have taken the middle ground and gone for a central
    position for the page x/y text...... some lines are redundant
    Dr B
    ===========================================
    var re = /.*\/|\.pdf$/ig;
    var FileNM = this.path.replace(re,"")+".pdf";
    var Path = this.path;
    var AcDate = new Date();
    var AcDateFormat = "yyyy/mmm/dd  HH:MM"
    var Box2Width = 50
    for (var p = 0; p < this.numPages; p++)
    var aRect = this.getPageBox("Crop",p);
    var TotWidth = aRect[2] - aRect[0]
           var fd = this.addField("xftDate", "text", p, [30,15,
    TotWidth-30-30,30]);
           fd.value =  FileNM;
           fd.textSize=12; fd.readonly = true;
           fd.alignment="left";
    var bStart=(0);
    var bEnd=(TotWidth);
           var fp = this.addField(String("xftPage"p1), "text", p,
           fp.value = "Page: " + String(p1) "/" + this.numPages;
           fp.textSize=12;  fp.readonly = true;
           fp.alignment="center";

  • How to send a 'filename' and a byte representation of a file

    Hey
    I have this very simpel program, the logic is.. Client sends a file to a server which stores the file... VERY SIMPEL!
    But what i wanna do is to send the filename as well, so the server can name the file dynamically based on the source file received
    My code looks like this now..
    Server code
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package serverreceivefile;
    import java.io.*;
    import java.net.*;
    * @author Maul
    public class ServerReceiveFile {
         * @param args the command line arguments
        public static void main(String[] args) throws IOException {
            System.out.println("Server is starting../");
            //Create a server socket that listens for incoming connection
            //request on port 10000
            ServerSocket ss = new ServerSocket(10000);
            while(true){
             // Listen for incoming connection requests from client
             // programs, establish a connection, and return a Socket
             // object that represents this connection.
                Socket s = ss.accept();
                System.out.println("Accepting connection.../");
                // Start a thread to handle connection
                new ServerThread(s).start();
    class ServerThread extends Thread{
        private Socket s;
        ServerThread(Socket s){
            this.s = s;
        @Override
        public void run(){
            BufferedInputStream bs = null;
            BufferedOutputStream bos = null;
            try {
              // Create an input stream reader that chains to the socket's
              // byte-oriented input stream. The input stream reader
              // converts bytes read from the socket to characters. The
              // conversion is based on the platform's default character
              // set.
              bs = new BufferedInputStream(s.getInputStream());
              bos = new BufferedOutputStream(new FileOutputStream("filecopy.txt"));
              int i = 0;
              while((i = bs.read()) != -1){
                  bos.write(i);
              bs.close();
              bos.close();
              s.close();
              } catch (IOException ie){
            System.exit(0);
    }Client code
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package serverclientsendfile;
    import java.io.*;
    import java.net.*;
    * @author Maul
    public class ServerClientSendFile {
         * @param args the command line arguments
        public static void main(String[] args) throws FileNotFoundException
            String host = "localhost";
            BufferedInputStream bis = new BufferedInputStream(new FileInputStream(
                    "file.txt"));
            Socket s = null;
            try {
                s = new Socket(InetAddress.getByName(host), 10000);
                // Create an input stream reader that chains to the socket's
                // byte-oriented input stream. The input stream reader
                // converts bytes read from the socket to characters. The
                // conversion is based on the platform's default character
                // set.
                BufferedOutputStream bos = new BufferedOutputStream(s.getOutputStream());
                int c;
                while((c = bis.read()) != -1){
                    bos.write(c);
                bis.close();
                bos.close();
            } catch (IOException ie){
    }As you can see the server 'hard codes' the filename of the received file from the client..

    Hi DJHingapus,
    If you don't want to build a dialog scenario between client and server, you may use a fixed length header which holds the name of the file to send. The stream will be composed with the header immediately followed by the binaries of the file.

  • Need to load and unload swf from single htm file

    I need to load or unload swf file or we can say that i need load 3 project one by one in current window

    mit,
    So are you saying you need to have one swf file call a second file to play, then call a third to play...
    Which Captivate version are you using?
    Are the swf files all captivate published swf's?
    Do you have access to Flash Professional and if so what version?
    how are you running your file, is it scorm packaged or just html based?
    I may be able to help with your issue, but need these details.

  • Java Message Mapping : Dynamic FileName and Directory for ASMA

    How to Put Dynamic FileName and Directory for ASMA Properties of File Receiver adapter in Java Message Mapping ???
    I know How to Do this in UDF , But In Java Type Message Mapping . How to do this ????
    Regards
    PS.

    Hi
    chk this:
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=95093307
    Thanks
    Amit

  • Insert filename and path?

    Hi,
    Can you insert the filename and path into a footer in a ID document same as you would with a Microsoft Word document?
    Thank you,
    Barb

    With CS3 use a text variable.
    Bob

  • To retrieve the PRT document (a PDF file) and insert the doc in PM order

    Hello guys,
    I have a challenging task in from printing as follows,
    By using TC: IW3D we get print preview of PM Order Set (PM Print Program: YIPRJT01), currently the PRT document number prints in the PM Order. Now we have to insert the PRT documents (a PDF file) into the PM Order set rather than printing the PRT document number ( By using TC: IW33 by going OPERTIONAL TAB we will get the PRT document(a PDF file))
    The requirement is to retrieve the PRT document (a PDF file) and insert the document in PM  order set with out navigating separately by using the TC: IW33.
    If you run the script in the print preview we can able to see PM the order set along with the PRT document (a PDF file).
    Thanks & Regards
    Vishnu

    I'm also trying to print PRT document with shop papers and still not able to do so. I selected "P" for print on the control key and it should print but still didn't print.
    If I understand it right, I think you are trying to do the same.
    Have you resolved this issue ?
    Thank you,
    Sam

  • Combine csv files and insert source filename

    Newbie powershell question - Need help combining multiple csv files (100+) and inserting a column containing the name of the source file
    ex: 
    Apples.csv
    A,B,C,D
    1,2,3,4
    Oranges.csv
    A,B,C,D
    1,2,3,4
    Desired output would look like this:
    combined.csv
    A,B,C,D,Filename
    1,2,3,4,Apples.csv
    1,2,43,4,Oranges.csv

    I did see a post with something similar to what I wanted to accomplish but it wouldn't work for me since my file names will change and I am not going to create a variable for each file
    $CSV1 = Import-CSV c:\csv1.csv
    $CSV2 = Import-CSV c:\csv2.csv
    $Result = New-Object PSObject -Properties @{
    Field1 = $CSV1.Field1
    Field2 = $CSV1.Field2
    Source1 = "CSV1"
    Field3 = $CSV2.Field1
    Field4 = $CSV2.Field2
    Source2 = "CSV2"
    $Result | Export-CSV c:\Result.csv -NoTypeInformation

  • Retrieve data from one numbers file and insert it in another?

    My goal is this:  I want to essentially link two numbers files.  I need data from several different tables in different sheets to automatically populate cells in a totally separate numbers file. 
    Here is why:  I have very detailed orders that all feed (link) to summary pages that are shared with clients.  I also need that same summary information, however, to feed to another file that calculates the margins.  The summary pages (sometimes dozens of pages) are critical for clients to see, but as you can imagine, the margins tables must never be seen by the clients. My preference is to have them be totally separate files so it eliminates the possibility of the margins table every being accidentally sent to clients.
    I'm wondering if applescript is the only or best way to accomplish this, or if there might be a more simple solution.
    Thanks in advance.
    Bob

    It may be done with a script but as I have no info about the structure of the document and about which values must be passed, I can't help you.
    More, I doubt that you are sending the Numbers document to your clients because this app isn't widely used.
    My guess is that you print the file in a PDF.
    The number of pages in the PDF will dramatically change if you include the sheets containing the margins so, it would be easy to check if you built a wrong document.
    To do the trick with a script, it seems that the easiest scheme would be:
    duplicate the original file
    add the columns required for the calculations
    create the formulas and insert them
    copy the relevant columns
    paste them in the original document.
    I'm reluctant to work this way. The risk of errors is too big.
    Here is an alternate scheme.
    In your document, change the layout so that columns which are supposed to be seen by clients are contiguous.
    This way, you may easily hide the columns which you want to keep 'secret'.
    I don't know the way you are working but with a bit of luck, once the formulas are built, maybe you have no need to unhide the 'margins columns'.
    Yvan KOENIG (VALLAURIS, France) mercredi 4 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : http://public.me.com/koenigyvan
    Please : Search for questions similar to your own before submitting them to the community
    For iWork's applications dedicated to iOS, go to :
    https://discussions.apple.com/community/app_store/iwork_for_ios

  • Inserting filenames and pathnames into headers

    According to Pages '08 help:
    "Using Headers and Footers
    Add headers and footers to give your documents page-by-page identity by showing the date and time, page number, or filename and pathname."
    OK, I wish to add automatically updating filenames and pathnames in my headers.
    Except there appears to be no way to do it?
    Can you help?
    Thanks

    Hello
    Here it is:
    -- [SCRIPT]
    tell application "Pages" to set u to path of document 1
    (* "/Volumes/AluIce2504vide/autour d'iWork'08/documents_Pages/La cigale et la fourmi.pages" *)
    set ky to "/Volumes/"
    if u starts with ky then
    set u to text (1 + (count of ky)) thru -1 of u
    (* "AluIce2504vide/autour d'iWork'08/documents_Pages/La cigale et la fourmi.pages" *)
    else
    if character 2 of (0.5 as text) is "," then
    error "Impossible de recoder le chemin" & return & "«" & u & "»" number 701
    else
    error "Can't parse the path" & return & "“" & u & "”" number 701
    end if
    end if
    set u to POSIX path of u
    (* "/AluIce2504vide:autour d'iWork'08:documents_Pages:La cigale et la fourmi.pages" *)
    set u to text 2 thru -1 of u
    set the clipboard to u
    (* "AluIce2504vide:autour d'iWork'08:documents_Pages:La cigale et la fourmi.pages" *)
    -- [/SCRIPT]
    Save it as an application.
    yourStartupDisk:Users:yourAccount:Library:Scripts:Applications:Pages:
    maybe you will have to create the Pages folder and even the Applications one.
    Select the document in which you want to paste its pathname
    Execute the script from the System's Scripts menu
    Paste where you want.
    Yvan KOENIG (from FRANCE mercredi 28 novembre 2007 18:40:01)

  • XSLT mapping to retrieve FileName from FILE SENDER adapter

    Hi
    I have an File Sender adapter scenario where I have switched on Adapter-specific message attributes (FileName).
    In my XSLT mapping program I need to RETRIEVE the filename and map it. Can anyone help please?
    Thx in advance

    Hi Bohamo
    Refer the following link.It provides the required solution for you.
    http://help.sap.com/saphelp_nwpi71/helpdata/EN/83/2200cb50d345c793336d9a1683163e/frameset.htm
    Thanks
    Ram

  • Inserting a hyperlink displays HTM extension

    I just noticed that when inserting a hyperlink:
    If the Topic List pod is set to View by File Name, the hyperlink displays the filename (with the HTM extension).
    If the Topic List pod is set to View by Topic Title, the hyperlink displays the topic title.
    Is this normal behavior? (Excuse the question, but I'm learning RH as I go.)

    Hi there
    Absolutely it's normal. One way you are viewing the actual file name used (along with the htm file extension). The other setting controls whether you view by the title you assigned to the topic.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

Maybe you are looking for

  • Short Dump : Page Overflow

    Hi All, When i am executing a report on Production, i am getting short dump - "Page overflow". It's very urgent. Early response will be highly appreciated. Best regards,

  • Calendar-event mail sent twice

    Hello, A strange behavior (bug?) happen on my installation of COMMS6 U1. When a user modify an event on his calendar a notification is sent to him (as i want) but a second mail is also sent (see the CC: header) to a non-defined user : "FQDN_of_my_ims

  • Disk Repair Problem

    I tried doing a disk repair on my start up disk (booting from the Tiger Install DVD, using Disk Utilities). I keep getting an error that Disk Repair can't repair my disk due to an Exit error. Of course it does not tell me what the error is. The same

  • I bought a iPad new on Aug.30. Can I upgrade it with an A6x edition ?

    I bought a iPad new on Aug.30. Can I upgrade it with an A6x edition ?

  • Black screen as soon as facetime connects

    After installing ios6 whenever I facetime the users at the other end get a black screen with a message "poor Internet connection".... This never happened before.... Nothing wrong with the internet connection!!....Reading other posts looks like this i