Automate the process of saving Framemaker documents (*.fm) as Xml Files

Hi,
I am new to framemaker. We have a list of Framemaker document files (*.fm files) coming  into a folder.  We need to pick up these files and convert to xml format (same as the saveAs opertion from the File menu).
I have written the follwing function to Save fm files to xml
Code to Save fm files to xml files
function saveAsXml (doc) {
   // Get required parameters for the save function.
    var params = GetSaveDefaultParams();
    var returnParamsp = new PropVals();
    // Replace the .fm extension with .mif.
    var saveName = doc.Name.replace (/\.[^\.\\]+$/,".xml");
    var i = GetPropIndex(params, Constants.FS_FileType);
    params[i].propVal.ival = Constants.FV_SaveFmtXml;
    // Save the document as XML.
    doc.Save(saveName, params, returnParamsp);
How to automate this process so that code checks -
1) New fm files in the folder
2) Saves the fm file as xml
3) Moves the saved fm file to a different folder
Thanks,
GC
[Message moved to Scripting Forum by moderator]

Have a look at the sample script below. The "while" loop waits for the specified number of milliseconds, then reads the contents of a directory and processes every individual file in the directory. In my example, it just prints the file path to the console. You would replace this part with your Open / Save as / Move sequence.
For more file system commands, refer to Adobe's Javascript Tools Guide, "File object functions".
var stop = false;
while( stop==false ) {
    // Wait for 20.000 ms
    $.sleep(20000);
    var fld = new Folder("c:/incoming");
    var filesInFld = fld.getFiles("*.fm");
    for(var f=0; f < filesInFld.length; f++) {
        // process the individual file
        $.writeln(filesInFld[f]);
    // Exit the  loop after 19:00
    var time = new Date();
    if( time.getHours() > 19 ) stop = true;

Similar Messages

  • Would like to automate the process of hyperlinking pdf documents

    I've been tasked with finding a solution to the following problem:
    A need has arisen where I work where large PDF files (commonly > 2000 pages) need to be hyper-linked. The PDF files are in fact Brief's of Evidence (prosecution files) and are generally in a particular format and order. Generally, the order is as follows: 1. Various index documents, 2. Witness statements and 3. Exhibit documents. Usually there are many more exhibit documents than there are witness statements.
    In each witness statement, the witness may refer to an many exhibit documents and it's this reference that needs to be hyper-linked to the particular exhibit document (located many pages away).   As a standard each exhibit is allocated an exhibit number, commencing at 1 but displayed as "0001". The filename of the individual exhibit is accordingly named, "0001.pdf" Using Adobe Professional (version 7) these files are merged and as a consequence bookmarks are automatically created.
    What tools from Adobe are available that will assist with programmatically or automatically scanning (checking) each witness statement (a pdf document) and where relevant predetermined (however that's done or achieved) areas (exhibit references) are required to be hyperlinked to their respective document many pages away.
    Is this doable?   Are there developer kits available?
    Any advice appreciated.
    Regards,
    Steven Taylor

    Acrobat can't do what you want out of the box.  It needs a plug-in that can do that.  Have a look at this third party plug-in for Acrobat:  AutoBookmark™ Plug-in for Adobe® Acrobat® / Create and Manage PDF Bookmarks, Links and Destinations   It has a trial version so you can test it to see if it meets your needs.

  • Can I automate the process of printing booklet?

    Can I automate the process of printing booklet?
    I use a saved Print Preset named "A5 booklet"
    I supply page range 1-16 then print as pdf using PDFCreater.
    File Name as 01.pdf, then pages 17-32 as 02.pdf and so on.
    I am aware that InDesign provides printBooklet() method through scripting, but I have no clues how to use it.
    Any links or scripts are welcome.
    Thanks and regards.

    Thanks stephen0218 for the idimposer link.
    I'm aware of Print Booklet... functionality, and I am currently using it to manually print booklets from InDesign files.
    I want to automate the print booklet task itself.
    I make 01.pdf with page range of 1-16, then 02.pdf with page range 17-32 and so on.
    It is not that much tedious for small files of upto 160 pages, which generate 10 pdf files. But for larger projects of upto 600 pages, the manual work is very time consuming and error prone process.
    I tried to call "document.printBooklet" function in JavaScript, but got stuck in supplying dynamic page ranges.
    Here is the Documentation.
    It will be a great help if anyone can help me here.
    Thanks and regards.

  • Who can I automate the process of printing booklet?

    Who can I automate the process of printing booklet.
    I use a saved Print Preset named "A3 booklet"
    I supply page range 1-16 then print as pdf using PDFCreater.
    File Name as 01.pdf, then pages 17-32 as 02.pdf and so on.
    I am aware that InDesign provides printBooklet() method through scripting, but I have no clues how to use it.

    Thanks stephen0218 for the idimposer link.
    I'm aware of Print Booklet... functionality, and I am currently using it to manually print booklets from InDesign files.
    I want to automate the print booklet task itself.
    I make 01.pdf with page range of 1-16, then 02.pdf with page range 17-32 and so on.
    It is not that much tedious for small files of upto 160 pages, which generate 10 pdf files. But for larger projects of upto 600 pages, the manual work is very time consuming and error prone process.
    I tried to call "document.printBooklet" function in JavaScript, but got stuck in supplying dynamic page ranges.
    Here is the Documentation.
    It will be a great help if anyone can help me here.
    Thanks and regards.

  • In the process of saving a file a power surge rebooted computer. Any chance of recovering file?

    In the process of saving a file a power surge rebooted computer. Any chance of recovering file?

    Have a look at the sample script below. The "while" loop waits for the specified number of milliseconds, then reads the contents of a directory and processes every individual file in the directory. In my example, it just prints the file path to the console. You would replace this part with your Open / Save as / Move sequence.
    For more file system commands, refer to Adobe's Javascript Tools Guide, "File object functions".
    var stop = false;
    while( stop==false ) {
        // Wait for 20.000 ms
        $.sleep(20000);
        var fld = new Folder("c:/incoming");
        var filesInFld = fld.getFiles("*.fm");
        for(var f=0; f < filesInFld.length; f++) {
            // process the individual file
            $.writeln(filesInFld[f]);
        // Exit the  loop after 19:00
        var time = new Date();
        if( time.getHours() > 19 ) stop = true;

  • How to automate the process of Uploading RPD ?

    Hi All,
    I am on 11.1.1.6.0 and Windows server 2008. What I am wanting to do is to automate the process of uploading the repository on my development server and restarting the server automatically. And I want this to happen 3 times a day at specified intervals. For ex, I want that automatically, at 6:00 AM, 3:00 PM and 6:00 PM everyday my MUD repository should be uploaded to my development BI server without any manual intervention whatsover.
    I know this can be done using the wlst sctipts. I have couple of questions around that will appreciate if anybody can answer both of them.
    1. I don't know and understand the language which wlst scripts use. And even if somebody gives a ready script I should be able to understand that. So the question is from where can I learn that language. Like for BIP, we can learn xslt from w3 schools. How can i do for wlst tool/ scripts?
    2. Lets say I learned the language and created a script abc.py which uploads the repository. But How will that be automatically called or run on my Development Server? By a windows batch script? If yes, then who will run that windows batch script ? Do I need to manually run that? Or running of Windows Batch script can also be automated and can be run at specified intervals as I want?
    I'll appreciate if somebody can explain me this in detail.
    Thanks,
    Ronny

    Check this
    http://ssssupport.blogspot.com/2012/10/obiee-11g-deployment-using-shell-script.html
    Any updates on this :)
    How you end up with this?
    Edited by: Srini VEERAVALLI on Dec 28, 2012 8:21 AM
    Any updates Ronny!!
    Edited by: Srini VEERAVALLI on Jan 2, 2013 7:33 AM

  • Need to automate the process of partial orders-deliveries

    Hi experts,
    I need to automate the process of partial order deliveries in VL01N.
    I checked few BAPI for the above requirement.
    BAPI_OUTB_DELIVERY_CHANGE
    BAPI_OUTB_DELIVERY_SAVEREPLICA
    BAPI_OUTB_DELIVERY_CONFIRM_DEC
    But have no clue ,which would be relevent.
    If any one of you have worked on any such requirement before,please let know,which BAPI i can use in this development.
    Thanks in advance.
    Meenakshi

    Hi
    Try with function modules WS_DELIVERY_UPDATE and RV_DELIVERY_CREATE.
    Regards
    Srilaxmi

  • HT1541 i need to gift paid App to my subscriber base free, how can i do it? is there any way to automate the process it? i dont mind paying for it

    Hi,
    I have a plan of gifting popular gaming app to my user base based on certain criteria.
    I'm aware that you can gift the app through itunes.
    What i want to know if there is any way to automate the process, like any api calls to gift the app to my user base?
    Any sugestion will be most welcome
    Affu

    Hi affu_india,
    If you are looking to do volume gifting of an app, you may find the following page helpful:
    Apple - Business - Volume Purchase Program for Business
    http://www.apple.com/business/vpp/
    Regards,
    - Brenden

  • How to automate the process of creating BIAR files

    Dear All,
    Is there any way I can automate the process of creating BIAR files from the repository (Crystal / Webi reports)?

    Hi
    please check the administration guide for BO XI 3.1 (look in the chapter BIAR command line tool)
    [http://help.sap.com/businessobject/product_guides/boexir31/en/xi3-1_bip_admin_en.pdf]
    You can generate BIAR files from the command line and thus automate this at OS level.
    Regards,
    Stratos

  • How to automate the process of adding members into the planning workflow and assigning owners to it?

    Hi,
    We have a workflow XYZ. After every two-three days our entity structure is getting refreshed - so new entities comes in.
    Every time we have to manually add these new entities to the workflow and assign owners to it.
    Please let me know if there is any option to automate the process.
    Hyperion Planning version is 11.1.2.2 .
    Thanks.

    Hi, Vivek.
    Currently, ExportPDF can only handle 1 file at a time. Adobe Acrobat can do batch export to Excel, however.
    This idea has already been added to the ExportPDF Ideas list ("Export multiple..."). If you'd like to see this improvement to ExportPDF, please add your vote or comment here.
    Thanks.
    Dave

  • Automate the process in finding the measure from the catalog reports

    Hi Experts!
    Is there any way to automate the process of finding the measure in the report and replace with new measure?
    Please let me know if anything that i can use.
    Actually i am using the OBIEE 11.1.1.5 v of obiee.
    Thanks,
    Mani.

    Thanks for your reply.
    Actually we have 100's of such reports, so it cannt be done mannually for each.
    Wondering if there is any process that we can run some script and automate the process instead of manual effort.
    here is little more explanation of my situation
    i got a big Subject Area with hunders of reports created.
    but now we have a requirement of spliting the Big SA to number of Diff SA's (for user visibility) where the measures are splited into diff subject areas.
    now the reports need to be modified accordingly based on the measures of which subject area needs to be....
    hope this makes clear.
    Cheers,
    Mani.
    Edited by: eswar on 15-Oct-2011 09:15

  • Is it possible to automate the process...?

    Dear members!
    Is it possible to automate the process of subtitling? For example if I have MS Word file with the following table:
    Starting Timecode
    Ending Timecode
    Language of Original
       Local       Language   
    0001
    00:00:06:00
    00:00:06:01
    0002
    00:01:10:18
    00:01:12:02
    0003
    0004
    Is there any way to put that file on timeline in Premiere to superimpose subtitles with dialogues (for example) of Original Language? Can anyone give me step-by-step instruction on how to do that? I can edit text file in MS Word and delete unneeded column. Manual making of a few thousand titles is so boring!
    As a result I have to export AVI file with superimposed subtitles on screen.
    Thanx in advance to everybody!

    I believe that using After Effects is a lot easier because you can change the source text with keyframes.
    Take a look at this thread and watch the tutorial I did to demonstrate this.
    http://forums.adobe.com/message/4770932#4770932

  • How can we automate the process of selective deletion in process chain

    Hi,
    I got to delete data from ODS and InfoCube selectively every Tuesday. So I am aware that there is an ABAP program through which we can automate the process of selective deletion in Process chain. So plz let me know the proceedure to automate this process.

    Hi,
    Try this.
    Need to genrate the deletion program using tcode Delete_Facts.
    steps : 1 run the Delete_Facts tcode and give your cube name in the input parameter
    step2 . select deletion program and execute . you will get the system genarated program
    step 3 copy this prg and save as zprg.
    step4 : run the program with selection
    step 5. if your selection is date then you need to create dynamic varient needs to be populate the value for the date fields
    step 6: you need to maintain the date values in the TVAR table if necessary
    step 7. you need to use this custom prg in your process chain after completion of test
    source : SDN.
    Thanks,
    JituK

  • What is the difference between saving to "Documents" and "Macintosh HD" and when should you use each one?*

    What is the difference between saving to "Documents" and "Macintosh HD" and when should you use each one?

    When you save to the folder with the little house icon, the file is placed at
    /Users/your_user_name/
    You would really have to go out of my way to save at:
    (the shortcut for the Boot Drive, regardless of its name).
    I am not sure how you decided that Time Machine is not saving your files. The default is for Time Machine to do incremental Backups of everything on all attached drives, except for certain temporary information in Cache files. If you have four Users, Time Machine will back them all up.
    Looking at the raw Time Machine backups will tell you very little, because it does lots of its work with Hard Links, and because it does incremental backups, so only files that changed since the last Backup are saved at thet cycle. The way to determine whether Time Machine is saving things is to display the window you care about in the Finder, then invoke the "Star wars"/ "Back, back, back in time" Interface.

  • I recently updated the iOS on my ipad 3 and lost all my files in the process. How do I recover my lost files which were not previously backed up?

    I recently updated the iOS on my ipad 3 and lost all my files in the process. How do I recover my lost files which were not previously backed up?

    If you don't have them backed up somewhere, then there's little possibility of recovering them. There are some utilities that can in some cases recover an inadvertently-deleted photo, but I've found none that can recover photos or other data from an iPad that was erased as part of an iOS upgrade. You can do a web search for something like "iPhone photo recovery" and you'll find some utilities you can try.
    Regards.

Maybe you are looking for

  • My iphone 4s blacked out you cant see anything but a white line im trying to seee how can i transfer all my stuff off my iphone to this computer?

    My iphone 4s blacked out you cant see anything but I white line, how do you transfer everything from your iphone to a computer

  • ZoneAlarm and iTunes 7.0.1.8

    I was wondering if anyone else has problems with ZoneAlarm and iTunes 7 conflicts. Since I upgraded to iTunes 7 I have been experiencing stuttering or skipping music playback issues. This was ameliorated slightly with the upgrade to version 7.0.1.8,

  • Smartforms output in MS-Word

    Hi Experts, I'm using the Smartforms to get some output. For this I used, the Function Module 'CONVERT_OTF_TO_PDF' which gives the ouput in PDF format. Like that, Is there any possibilites to get the output in MS-Word format only (not in Notepad or W

  • SQL Plus backend process

    Suppose I execute a query from SQL Plus. Now this query takes long amount of time to execute. If I close the SQL Plus session does it also terminiate the process on the Oracle server. If not than in this case, if want to terminate the query processin

  • Intrastat report duplicating receipts for corrections

    Hi,  The situation is that,GR (movt.type-101)was done and then a reversal (movt type-102)was done and again GR was done.Now in Intrastat report only GR is getting displayed but not the Reversal.I mean to say that there are two entries for GR but ther