File System in Folder Level Script

Is it possible to access the File System in a Folder Level Script. For example I want to check if a certain file exists in the folder containing active document & load info from that file in a dialog box.
Thanks in advance

But I don't want to add any content, bloat to the doc.
I may just try to write a legit plug-in, since I have a little experiance writing C++ plug-ins for InDesign. But I wold like to just confirm that this functionality does not exist in Acrobat with scripting (due to sandboxing etc).
Thanks

Similar Messages

  • Import Text Data to text fields with folder level script

    I am using Adobe 9 professional and have a folder level javascript to import text into existing fields of a pdf.
    There are multiple fields with multiple rows of data to be imported.
    The folder level script is not working (but there are no errors in the console showing when run)
    I have manually tested opening the text file with the following code in the console and the text file opens and populates the text fields, so the text file must be correct:
    this.importTextData();
    The following code is the folder level script which is not working:
    function mailmergeFunction()
    // Import the first row of data from "Mailmerge.txt"
    this.importTextData("/h/mail merge/Jo Smith's Things/Mailmerge.txt", 0)
    if (typeof cnt == "undefined") cnt = 0;
    this.importTextData("/h/mail merge/Jo Smith's Things/Mailmerge.txt", cnt++ % 4)
    app.trustedFunction(mailmergeFunction);
    app.addToolButton({cName: "Mail merge",cExec: "mailmergeFunction()",cTooltext: "Mail Merge",cEnable: true,nPos: 14});
    If anyone can please provide some assistance, it will be most appreciated thanks.

    Working fine now, changed the location of the file path - could have been something to do with having an apostrophe.
    function mailmergeFunction()
    app.beginPriv()
    // Import the first row of data from "Mailmerge.txt"
    this.importTextData("/h/mail merge/Mailmerge.txt", 0)
    if (typeof cnt == "undefined") cnt = 0;
    this.importTextData("/h/mail merge/Mailmerge.txt", cnt++ % 4)
    app.endPriv()
    app.trustedFunction(mailmergeFunction);
    app.addToolButton({cName: "Mail merge",cExec: "mailmergeFunction()",cTooltext: "Mail Merge",cEnable: true,nPos: 14});
    Thank you for your assistance George, much appreciate your help.

  • Folder level script? How can I use field value as a pdf filename in save as dialog box

    I read somewhere that if you use a folder level script, you can do things like save a pdf with a specific filename - possibly based on a field name.
    How would one set up a folder level script?
    How do you execute a script from the PDF?
    What code would you use to change the PDF name to the contents of the fFieldName text field?
    Or, is this really just impossible to do?

    The article is interesting.  It suggests you place code like this:
    // Page Replacement Function
    var ReplaceLastPage = app.trustedFunction( function(cPath) {
    app.beginPriv();
    this.replacePages(this.numPages-1, cPath); app.endPriv();
    In the trusted folder.  What is the path of the trusted function(s) that get automatically loaded into Acrobat?
    I assume in the example above, function(cPath) is a function inside of the PDF...

  • How to search "ActiveDocs" in folder-level script

    I am trying to perform a search in an Acrobat folder-level javascript like this:
         function timerCallback() {
              app.beginPriv();
              search.query(searchText, "ActiveDoc");
              app.endPriv();
         app.beginPriv();
         app.openDoc(path_to_my_doc);
         app.endPriv();
         app.setTimeOut("timerCallback()", 5000);
    I use the setTimeOut function to make sure that the document has had enough time to open before I start the search.  The problem is that I get this error:
              GeneralError: Operation failed.
              Search.query:24:Folder-level:App:SearchScript.js
              No active document
    It seems like I can't "see" active documents from a folder-level script.  Is there any way around this?
    Thanks

    A folder-level script can be used for two things:
    - Execute commands relevant to the application as a whole, NOT dependent of
    any specific document (e.g. adding new menu items).
    - Create functions which should be available to any document or script that
    might need them (e.g. formatting a string in a certain way).
    What you're trying to do is neither here nor there. If you want to be able
    to search existing documents, you can use a folder-level function, but then
    you need to call it from somewhere else, like a menu item or a toolbar
    button.

  • Is it possible to install folder level script automatically by any other application ?

    I want to install  folder level javascript through flex application .is it possible to do this or by any other technology.
    1 way to do is to copy file using file stream of that application but as directory for folder level javascript is protected one therefore file operation give i/o error
    any other solution .

    I do not think any Adobe product will allow you to do this for obvious reasons. '
    You can use any installer program the will perform the installation for users if the users decide to allow your request.

  • Save As with suggested file name and folder

    I would like the user to be able to press a save button on the pdf and the "Save As dialogue box" pops up pre-populated with a file name and location choosen. The user can then choose to name the file something otherwise or select a new location. I would just like to save them the steps of copying the field data and finding the correct folder (deeply buried on server) however to place the finished document in.
    This doesn't seem to require a trusted function, but how do I suggest the file name based on a field name in the document. And how do I suggest the folder the document should be saved into?
    Thanks in adavance.

    Hi,
    you need a folder level script to use the browseForDoc method.
    http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf#page=10 4

  • App level vs. user level scripts error

    I am working on a trusted function to save a LiveCycle (pdf) file based on a field name. Upon research I have read that I am supposed to find the “app” and “user” folder level scripts. To find these scripts I should run the following script in the Acrobat Javascript debugger.
    app.getPath("app", "javascript");
    /C/Program Files/Adobe/Acrobat 10.0/Acrobat/JavaScripts
    app.getPath("user", "javascript");
    GeneralError: Operation failed.
    App.getPath:1:Console undefined:Exec
    2
    This was easy to do, however I received an error on the second script (“user”), and I am not sure if this effects placement of my trusted function. Does this error change where I place my trusted function? I am under the beleif the trusted function goes in the "app" folder lever.
    I have Acrobat X Pro and LiveCycle Designer ES2.
    Links: http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/common/html/wwhel p.htm?context=Acrobat9_HTMLHelp&file=JS_Dev_Contexts.73.4.html

    See if this helps: http://acrobatninja.blogspot.com/2011/09/acrobat-1011-javascript-changes.html
    In other words, you may have to first create the folder manually. The script will work whether you place is in the app folder or the user folder. The difference is code placed in the app folder will be available to all users, while code placed in the user folder will just be available to that user.

  • Need help with folder level javascript to automate "save button" on a fillable form

    I have been racking my brain for the past 6 hours trying to get a simple save button to work.
    Background: I am using Acrobat Pro 11 to create a save button on a fillable form. My intent is for the end users (my team of 3, whos computers I have access to) to be able to fill out the form, click save, and have the filename appended with date and other info and saved to a local folder on their machine.
    I am attempting to take the default form name i.e. Support Call Log.pdf and have three of the feilds within the form generate a new file name. --> Support Call Log_Brad_121_2015
    End users will fill out the form using adobe viwer X.
    Instead of putting the code that I have tried, modified, and tried again and again. I would like to ask for a fresh start and then see if I can locate my error after. I need to know what to put in my folder level script, line for line.
    I also need to know the correct syntax and format to establish a new file name with the extracted feild data, saved to the same exact file path as the original document.
    Any and all help will be greatly appreciated, I am about to go crazy!!!

    Didn't let me do it, invalid. So, here is what I have now changed my button code to:
    //get field value
    var fv1 = getField("Technician:").value;
    var fv2 = getField("Date Received:").value;
    var fv3 = getField("Unit Number:").value;
    // Split Path into an array so it is easy to work with
    var aMyPath = this.path.split("/");
    // Remove old file name
    aMyPath.pop();
    var NewFileName = "Support Call Log" + "_" + fv1 + "_" + fv2 + "_" + fv3 + ".pdf";
    NewFileName = NewFileName.replace(/[\s\!\?\<\>\'\"\*\/\\\=\?\^\`\{\}\|\~]+/g, "_");
    aMyPath.push(NewFileName);
    //save
    mySaveAs(this,aMyPath.join("/"));
    Im still getting the error dialogue box, and nothing shows in my javascript debugger window when I click the button. Seems to be something goofy with my Folder level script:
    var mySaveAs = app.trustedFunction(
         function(oDoc, cPath, cFlName)
              cPath = cPath.replace(/([^/})$/, "$1/");
              try{
                   oDoc.saveas(cPath + cFlName);
                   catch(e){
                                  app.alert("Error During Save");

  • RMAN copies to ASM and file system

    I am on 11g Rel 1 trying to do an RMAN backup with 2 copies of my backup. One copy should go to ASM storage and the other should go to a regular file system.
    My RMAN script is:
    run {
    configure default device type to disk;
    set backup copies 2;
    configure device type disk parallelism 16 backup type to compressed backupset;
    configure channel device type disk format = '+ASMDG2/backups/%d_%T_%U_dump0.bck, /orabackups/oracle/%d_%T_%U_dump0_offload.bck' MAXPIECESIZE 60G;
    configure controlfile autobackup on;
    backup incremental level=0 database plus archivelog;
    delete noprompt obsolete redundancy 1;
    exit;
    When the backup runs I get:
    RMAN-03009: failure of backup command ....etc.
    ORA-15124: ASM file name '+ASMDG2/backups/%d_%T_%U_dump0.bck, /orabackups/oracle/%d_%T_%U_dump0_offload.bck' containd invalid alias name...
    What is the correct syntax to get the copies to be able to go to ASM disk and regular disk locations?

    OK, I see that in the documentation this time. I'll try that for tonights backup and let you know how it works. I'm a bit concerned still because it looks like it wrote fine to the +ASMDG2 location.  I would have thought the whole backup would fail but I guess it was able to read the first path...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • File system recommendation in SAP -AIX

    Dear All ,
    Pls check my current file system of PROD .
    Filesystem    GB blocks      Used      Free %Used Mounted on
    /dev/prddata1lv    120.00     66.61     53.39   56% /oracle/IRP/sapdata1
    /dev/prddata2lv    120.00     94.24     25.76   79% /oracle/IRP/sapdata2
    /dev/prddata3lv    120.00     74.55     45.45   63% /oracle/IRP/sapdata3
    /dev/prddata4lv    120.00     89.14     30.86   75% /oracle/IRP/sapdata4
    1, How much Space is recommended to increase the total space of the sapdata1..4 file system in SAP.
    Currently we have assigned 120GB to each datafile. if its any recommendation of sapdata1,2,3,4 total space , how can proceed for further ?
    ie ---> is there any limitation to increase the sapdata file system in SAP .
    example sapdata1,...4 ---> max limit to increase is 200 GB like that .....
    2,secondly only sapdata4 is keep on growing and rest of the file system are not much .
    Kindly suggets
    Edited by: satheesh0812 on Dec 20, 2010 7:13 AM

    Hi,
    Please identify what are the activities that were taking place which was consuming your space so rapidly.
    Analyze if the same activities are going to be performed in future, if so for how many months.
    Based on the comparision of present growth trend you can predict future trend and decide. Also analyze which table/tablespace is growing fast and what were its related data files and where are they located, you need to increase that file system to high level rather increasing all file systems sapdata1...4.
    Based on gathered inputs you can easily predict future growth trends and accordingly increase your size with additional space of 10%.
    You can increase your file system there is no limitation such, but you will face performance related problems. For this you need to create a separate tablespace and move the heavily growing table data files into that table space with proper index build.
    Regards.
    Edited by: Sita Rr Uppalapati on Dec 20, 2010 3:20 PM

  • Adding a watermark from App-Level script

    Hello all,
      I've have a folder-level script that puts a button on the toolbar.  This button calls a function that will insert watermarks and append several PDF documents to the current one.  I've hit a roadblock with this.addWatermarkFromFile(). When the function is called an error is thrown that states the following:
    TypeError: this.addWatermarkFromFile is not a function.
      Pasting a few lines from the function into the console and executing from there works… but it always bombs when executed from a function.
      The documentation states it requires priveleged functionality, which I provided.  My function looks like this:
    function generateReport()
        app.beginPriv();
        this.addWatermarkFromFile(
            cDIPath:     strPathReportFront,
            nSourcePage: 0,
            nStart:      intPageReportFront,
            nEnd:        intPageReportFront
      //CODE CLIPPED FOR SAMPLE PURPOSE
      app.endPriv();
    app.trustedFunction(generateReport);
    Anyone know where I'm going wrong?

    App-level scripts have no knowledge of your document, therefore you can't
    use the "this" object like you do elsewhere.
    You have to pass a reference to the document as a parameter, and then use it
    in your function to call addWatermarkFromFile().

  • Folder level javascript.

    how can i use getNthPageWord methode from folder level script.

    function SaveXml() {
    myFun = app.trustedFunction( function()
        app.beginPriv();
    if(this != 'undefined')
        try
           for(i=0;i<70;i++)
              var arr= new Array();
              arr=this.getPageNthWord(2,i);
              console.println(arr);
        app.endPriv();
              catch(e){
              console.println("error");
    }else
         console.println("undefined");
              console.show();
    and i am calling savexml methode in cExec: property of addToolButton.but it is not working please tell where i am making mistake.

  • Folder level Javascript disabled for a user

    Hi Gurus,
    I created a folder level JS, it works fine on all computer here exept on one. On one computer, the javascript's in the pdf are working but the function called in the folder level script is not executed. (when it works on all the others). The script is in the right folder and the pdf works on other computers. Do I have to enable something in the preferences of acrobat reader 9.1. I checked the settings for JS in edit/preference and they are the same as for the others.
    Thanks for your help guys.

    All the script does it to generate a mail with the mailto function. The Preferences-JavaScript are set as on my pc. So it must be something else. If I email the pdf to my pc, it works, so the pdf form is fine, the script is the same as on my pc.
    --- En date de : Mer 2.9.09, try67 <[email protected]> a écrit :
    De: try67 <[email protected]>
    Objet: Folder level Javascript disabled for a user
    À: "antony clark" <[email protected]>
    Date: Mercredi 2 Septembre 2009, 13h35
    That's why I recommended to make a
    test script, to make sure folder-level
    scripts are working on this machine.
    There's no setting to specifically allow folder-level
    scripts. If they are
    properly placed and JS is enabled then they will launch.
    However, if your script inserts menu items you should make
    sure that this
    option is checked under Preferences-JavaScript, the second
    check-box from
    the top. You should probably check all 4 boxes, just in
    case.
    >

  • Developer needs access to OS file systems

    Hello
    Our CRM developer is requesting access to the following CRM java stack file systems at OS level. we are on AIX and our corporate policy does not allow access to the UNIX servers file systems to the developers.
    is there a workaround?
    /usr/sap/SID/JC01/j2ee/
    All access (read.write,delete) for /usr/sap/SID/JC01/j2ee/cluster/server0/apps/sap.com/crm~b2b/
    Thanks
    Raghu
    Edited by: Raghu Gajjala on Sep 15, 2010 12:30 AM

    Hi,
    Could you explain the reason for this?
    Regards,
    Caíque Escaler

  • Strategy and Process on how to best enqueue from the file system

    I have a single database that must accept BFILES from one location via a directory folder, http text documents via proxy server, and unstructured XMLTYPE CLOB from another database.
    I have created an ANYDATA queue, and will try to transform the dequeued output to XMLTYPE payloads for a pl/sql callback.
    My problem is how to monitor both the file system BFILE folder, and the XMLTYPE CLOBS, to automatically begin then enqueue process. The queue would have to accept from (1) to anynumber of files, and given that requirement the use of an array batch is what I would like to use, but need to populate the array.
    Any help would be most appreciated.
    David

    Thank you for the quick reply.
    The database version is 10.2.0.3.
    There are three sources of documents coming into the system.
    Source 1: Outside entity (in-front of a secure firewall) who must place their XML (XSD compliant) files on a shared file system server (the BFILES).
    Source 2: Internal entity (behind firewall) who publishes their XML files to a defined database directory on the database server.
    Source 3: Enterprise Intranet contributors submitting their individual files via url.
    On entry for each file they must be validated for XSD compliance then if passed submitted to the main enqueue for propagation to 5 additional process queues with separate callback procedures.
    If reasonably possible, separate agents of some sort would "listen" at each folder location, then begin the enqueue process when either a batch of files or a single file is placed in the directory folder.
    AQ itself has no such mechanism to monitor locations, and a scheduled job makes sense - however the job would have to continuously run given the very short processing requirement. However, using DBMS_SCHEDULER may be the best solution given ALL rhe requirements.
    Thank you for your professionalism - I appreciate the assistance.

Maybe you are looking for

  • Can we see Customer # in line item of accoutning doc for Rebate Correction

    Hi SD gurus, Now we have a requirement about rebate correction. In correction step, business want to see the customer number in line item of accounting document since it will be easy for them to do the reconciliation. I know there are allocation # an

  • Why is my Apple ID not allowed to access iTunes Connect?

    I'm trying to apply to post my podcast via iTunes, but in the process of trying to apply, I receive an error message informing me that my Apple ID is not authorized to access iTunes Connect. Any suggestions?

  • Can't get movies not to Autoplay

    I have created a page with a load of Quicktime movies with poster frames using iWeb, but they all start loading immediately in Safari. I have checked the "autoplay" flags in the js file and they are set to false. What's going on? Many thanks iWeb 3.0

  • I get "failed to initialize" when I try to download Adobe Flash

    I un-  installed my previous version because I was having trouble loading farmville. I used the adobe uninstaller not remove programs. I can't reinstall the latest version in either Firefox or explorer. I have windows XP. I downloaded the Adobe suppo

  • Strange error message when creating Project Excel Template, can anyone explain?

    I am getting this error every time I create a Project Excel Template, and I don't know why, nor do I understand what the error message is trying to tell me. The project is very simple, just a task list with resources assigned, but the resources are n