SAVE AS script w/Default file name?

I have created a SAVE AS button on my form however; the default file name is random characters in a temp folder path. How can I change the file name to automatically appear as one of my form field values?
Ex: Someone presses the SAVE AS button and the dialog comes up with the default file name "FileNameField.pdf".
I'm not as concerned about the path as I am about the file name. I also want to deploy this for to many people and don't want to install anything at each workstation in order for the script to work.
It seems like it would be an easy script...but I can't find anything that's remotely 'easy' out there.
The ultimate goal is to have the File Name = to one of my form fields called 'FileName".
Thanks for any insight...
-Joe

This is only possible with a folder level script.
You will have to install those script on your system.
Details and samples can be found here:
http://thelivecycle.blogspot.com/2009/11/save-form-to-specific-directories-and.html

Similar Messages

  • Need help adding a default file name in a file chooser of save dialog type

    I need to create a file chooser with save dialog type, how can I add a highlighted default file name into the File Name textfield? As in Microsoft Word, when you want to save a document, a default file name Doc1.doc will appear in the File name text field of the file chooser even when you change to other directories.

    For JRE 1.4.0 you can use this fix:
    public class FileChooserFix implements PropertyChangeListener {
      private String fileName;
       * @see PropertyChangeListener
      public void propertyChange(PropertyChangeEvent ev) {
        JFileChooser chooser = (JFileChooser)ev.getSource();
        if (JFileChooser.FILES_ONLY == chooser.getFileSelectionMode()) {
          if (JFileChooser.SELECTED_FILE_CHANGED_PROPERTY.equals(ev.getPropertyName())) {
            File selectedFile = (File)ev.getNewValue();
            if (selectedFile != null) {
              // remember fileName of selected file
              fileName = selectedFile.getName();
          if (fileName != null &&
              JFileChooser.DIRECTORY_CHANGED_PROPERTY.equals(ev.getPropertyName())) {
            // reset selected file
            File directory = (File)ev.getNewValue();
            chooser.setSelectedFile(new File(directory, fileName));
       * Convenience method to create a fixed file chooser.
       * @return      fixed file chooser
      public static JFileChooser create() {
        JFileChooser chooser = new JFileChooser();
        chooser.addPropertyChangeListener(new FileChooserFix());
        return chooser;

  • AdobePDFViewer.plugin And Default File Name When Saving

    When I grab a PDF document from a web page, it opens in a Safari Window just fine, as expected. I get the Adobe Plug-in Tool Bar as expected. So now I want to File:Save As the document that I have grabbed and am now looking at in my Safari window. The File:Save As dialog opens and the document title always defaults to 'downloadDocument' instead of the actual name of the file that I have grabbed, even if the html has passed the true file name to the browser and plug in. This means I have to retype the name of the document before I click OK. What a pain......
    I cannot find a preference or other setting that would be controlling this. I've looked through the Safari Prefs and the Adobe Prefs
    I should note that I have Acrobat Pro 9.0.0 installed, and I'm running Safari 3.2.1 (5525.27.1) on an MBP 2.5GHz C2D with 4GB of RAM. OS X v10.5.6 totally current.
    How do I get the default file name in the File:Save As dialog to be the name of the file I have grabbed?

    Well, that results in the correct document name appearing in the Save As dialog.
    However, it also means all the Adobe tools are gone.
    And more importantly, it means that the in-document bookmarks are not available for use. The bookmarks are critical in our application. We work with very long documents (big insurance policies) that have many sections and hence they are all bookmarked so that we can move from section to section easily and find the specific sections, pages, endorsements, etc. that we need.
    So, it appears my next step is to "visit" Adobe and find out why they don't play nice??????

  • Is there a way to change the export default file name

    I have a request to change the default file name when doing a pdf export of a report. By deault, when pushing the export to pdf button, the name is NONAME.pdf. They want the default name to be the channel name is displayed on the report.
    Is there an easy way to do this, or will I have to load all new code into the export button?

    What you'll probably want to do is create a script that uses the Call Report.Sheets.ExportToPDF function and programatically specify the name.  From here, you could set it as one of the function buttons or even include it on the toolbar if you'd like.
    Jesse S.
    Applications Engineer
    National Instruments

  • When I save a PDF report the file name is xdo instead of "report name.pdf"

    Hi,
    I started a new project with BI Publisher integrated with OBIEE, I builded a set of reports that are working properly (these are the first reports on this OBIEE/BIP server)
    Accessing Oracle BI Cataloge I can run the reports and change the output format to pdf.
    when I press the right mouse button and select "save as" a dialog box appears.
    On the "File name" field, the default name that BIP writes is "xdo" I would like it to be the "name of the report.pdf".
    It seems that if I create a new report the file name is correct but if I change the name of the report then BIP always selects XDO as the default file name.
    Is there any place where I can configure the default name.

    Thanks for the quick reply.  I figured out how to get the desired results by using tagging.  For anyone who may reference this post in the future, I went to "Customize" in the top right corner of Adobe, then selected "Create new tool set...", looked under "accessiblity and found the "tag" option.  Hit ok, tag is added to the toolbar.  Then I highlighted the dataset in the PDF that was relevant to the output format, then clicked "tag", saved as spreadsheet.  Sorry I can't provide more details on how tagging works or if there's a more elegant solution available, but I'm sure one's out there.

  • Script to insert file name into keywords field of same file

    Hello,
    search a solution, a Script or another, which writes the file name into keywords field of same file (Metadata: Description/Keywords) in "photoshop", "bridge" or better in "Lightroom" .
    I found this topic from Mike Hale http://www.ps-scripts.com/bb/viewtopic.php?t=1330
    It's possible this script to change this in such a way that it does this:
    "script to insert file name into keywords field of same file"
    Thanks and best greetings
    Wolfgang

    This works in CS2:-
    #target bridge
       if( BridgeTalk.appName == "bridge" ) {
    nameDescription = MenuElement.create("command", "AddName to Description", "at the beginning of Thumbnail");
    nameDescription .onSelect = function () {
         nameToDescription();
    function nameToDescription(){
    var items = app.document.selections;
          for (var i = 0; i < items.length; ++i) {
             var item = items[i];   
    var m = item.synchronousMetadata;
    filenameToDesc(m, item.name.slice(0,-4));
    function filenameToDesc(metadata, Description) {
    var strTmpl = "name2Desc";
    var strUser = Folder.userData.absoluteURI;
    var filTmpl = new File(strUser + "/Adobe/XMP/Metadata Templates/" + strTmpl + ".xmp");
    var fResult = false;
    try
    { if (filTmpl.exists)
    filTmpl.remove();
    fResult = filTmpl.open("w");
    if (fResult) {
    filTmpl.writeln("<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"3.1.2-113\">");
    filTmpl.writeln(" <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">");
    filTmpl.writeln(" <rdf:Description rdf:about=\"\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">");
    filTmpl.writeln("<dc:description>");
    filTmpl.writeln("<rdf:Alt>");
    filTmpl.writeln("<rdf:li xml:lang=\"x-default\">"+Description+"</rdf:li>");
    filTmpl.writeln("</rdf:Alt>");
    filTmpl.writeln("</dc:description>");
    filTmpl.writeln(" </rdf:Description>");
    filTmpl.writeln(" </rdf:RDF>");
    filTmpl.writeln("</x:xmpmeta>");
    fResult = filTmpl.close();
    metadata.applyMetadataTemplate(strTmpl, "replace");
    filTmpl.remove();
    catch(e)
    { fResult = false; }
    return fResult;

  • Default File name using CL_BDS_DOCUMENT_SET= CREATE_WITH_TABLE

    Hi folks,
    We are using BSP application to display smartform in PDF format in a new page/window. When I try to save the PDF from the browser/window, its pops up a screen with defaults as "Desktop" and a File Name. I am not sure how system is generating the default file name. How can we change this File Name?
    Thanks for help!
    Best Regards,
    Praveen

    Hi,
    It's done while creating the Response-Caching as in below code:
    cl_http_server=>server_cache_upload( url = filename   response = response ).
    We can pass custom value in the variable filename.
    Kind Regards,
    Praveen

  • Is it possible to propose another default file name in ALV Excel Export?

    Hello All,
    I have a problem while exporting to Excel from the WD ALV. The whole process works fine, the problem occurs when the user wants to open (without saving) multiple exported Excel documents at the same time. In this case he gets an error message, that the document with the same name has already been opened.
    Therefore I have a question, is it possible to customize default file name, so that instead of 'export.xlsx' the file name will contain e.g. WD title&time (or something like that)?
    Thank you very much in advance.

    Hi,
    It's the standard functionality. You actually have to enhance the standard method, which is not advisable as the same will be called in other applications as well.
    So, Instead of that, hide the standard Export functionality and create a new Tool bar button, say, 'Export to Excel' and in on action of that button, use cl_wd_runtime_services=>attach_file_to_response ( and pass the file name by concatenating date/time) method to open/save the file.
    Check this document to create a custom button in ALV tool bar: Creating Self-Defined Functions in WDA ALV
    And, check this blog by Chris for code reference to have Export to Excel functionality: Using WD ABAP ALV export - the hacked way
    Hope this helps u,
    Regards,
    Kiran

  • Changing the default file name while saving the PDF interactive form

    Hi All,
    I am generating an Interactive PDF form using webdynpro, but when I try to save the PDF to my local machine the default file name comes as "<b>unknown.pdf</b>" so I have to manually go and enter the name before saving it.
    Is there any way to change this default name so that I don't have to manually edit the file name each time when I want to save the generated PDF interactive form?
    Please reply soon.
    Thanks in advance!

    I am running into the same issue. Setting the desname parameter (e.g. desname=temp.pdf) doesn't have any effect. Has anyone found a solution to this?
    Thanks,
    Brian

  • JFile chooser default file name setting

    Could anybody pls tell me how I can set a default file name when JFile chooser Save dialog box appears so that the user doesn't need to name the file to be saved. And I also want to get the name of a file from current selected directory so that I can warn user for the replacement, The code I tried with is as follows
    public void SaveAs()
                    String FileName="";
              JFileChooser jfc = new JFileChooser();
              int r = jfc.showSaveDialog(this);
              if (r== JFileChooser.APPROVE_OPTION)
                   FileName = jfc.getSelectedFile().getPath();
                   FileName=FileName+".java";
                   writeFile(FileName);
         }//End of SaveAs() Method
      public void writeFile(String fn)
               String contetnt="THIS IS A FILE";
              try{
                   FileWriter fw = new FileWriter(fn);
                   fw.write(contetnt);
                   fw.close();
              }catch(FileNotFoundException fnfe){}
               catch(IOException ioe){}
         }//End of writeFile(String fn) Method

    Works fine for me.
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)", that demonstrates the incorrect behaviour.
    http://homepage1.nifty.com/algafield/sscce.html
    Don't forget to use the "Code Formatting Tags", so the posted code retains its original formatting.
    http://forum.java.sun.com/help.jspa?sec=formatting

  • Can i set a default file name with path when using IOpenFileDialog?

    At present, if i use
    IDFile xmlDataFile("C:\\a.txt");
    openFileDialog->DoDialog(&xmlDataFile, resultFiles, kFalse, &title);
    It use "C:\" as its default folder, but the file name box is empty, what i want is to show "a.txt" as its default file name.
    It looks like there is no such api to set a default in  IOpenFileDialog.
    Am i right?

    At present, if i use
    IDFile xmlDataFile("C:\\a.txt");
    openFileDialog->DoDialog(&xmlDataFile, resultFiles, kFalse, &title);
    It use "C:\" as its default folder, but the file name box is empty, what i want is to show "a.txt" as its default file name.
    It looks like there is no such api to set a default in  IOpenFileDialog.
    Am i right?

  • How to set selected file in FileChooser showSaveDialog to default file name

    Hi,
    How do I set selected file in JavaFX 2.0 FileChooser showSaveDialog, so I can prompt the user with a suggested default file name?
    I am converting a Java Swing application I wrote a few years ago to JavaFX 2.0.
    In the Swing application, I use setSelectedFile() as follows:
    JFileChooser jFileChooser = new JFileChooser();
    jFileChooser.setSelectedFile(new File(backupfile));
    jFileChooser.setCurrentDirectory(new File(outputDirectory));
    FileFilter filter = new FileNameExtensionFilter("Comma Delimited (*.csv)", "csv");
    jFileChooser.addChoosableFileFilter(filter);
    jFileChooser.setFileFilter(filter);
    filter = new FileNameExtensionFilter("XML Document (*.xml)", "xml");
    jFileChooser.addChoosableFileFilter(filter);
    jFileChooser.setAcceptAllFileFilterUsed(false);
    jFileChooser.setDialogTitle("Export File");
    int returnVal = jFileChooser.showDialog(jFrame, "Export");
    This would show a file chooser with the file name text field pre-populated with a default backup file name.
    I can't find an equivalent in JavaFX.
    Also, in the Swing application, I was able to determine which extension filter was selected at run time using getFileFilter().getDescription() as follows:
    String extension = jFileChooser.getFileFilter().getDescription();
    if (extension.equals("XML Document (*.xml)")) { ...
    I can't find an equivalent in JavaFX.
    Thanks,
    Barry

    You can use the open sequence file method on the application manager (then you only need to wire the file path)
    Rodéric L
    Certified LabVIEW Architect

  • How to set the default file name for upload

    Hi All,
    I have the following BSP app for a file upload of a csv file. I want the page when displayed show the default file name to be loaded as c:\db1\currentPM.csv
    What changes do I need to make to get the default file name in the BSP app.
    Thanks
    Karen
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content id               = "content"
                   design           = "classicdesign2002design2003"
                   controlRendering = "sap"
                   rtlAutoSwitch    = "true" >
      <htmlb:page title="File Upload " >
        <htmlb:form method       = "post"
                    encodingType = "multipart/form-data">
              <htmlb:textView text   = "File:"
                              design = "STANDARD" />
              <htmlb:fileUpload id          = "uploadID"
                                onUpload    = "UploadFile"
                                upload_text ="Upload"/>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    On Input Processing
    event handler for checking and processing user input and
    for defining navigation
    DATA: EVENT TYPE REF TO IF_HTMLB_DATA,
          DATA TYPE REF TO CL_HTMLB_FILEUPLOAD,
          LV_OUTPUT_LENGTH TYPE I,
          LV_TEXT_BUFFER TYPE STRING,
          FILE_NAME TYPE STRING,
          FILE_PATH TYPE STRING ,
          INTERN TYPE TABLE OF  ZALSMEX_TABLINE.
    DATA: LT_BINARY_TAB TYPE TABLE OF SDOKCNTBIN .
    TYPES: BEGIN OF TY_TAB,
           FIELD1(2) TYPE C,
           FIELD2(2) TYPE C,
           FIELD3(2) TYPE C,
           FIELD4(2) TYPE C,
           FIELD5(2) TYPE C,
           END OF TY_TAB.
    DATA:  WA_TAB TYPE TY_TAB,
           IT_TAB TYPE TABLE OF TY_TAB.
    TYPES: BEGIN OF TY_LINE,
              LINE(255) TYPE C,
           END OF TY_LINE.
    DATA:  WA_LINE TYPE TY_LINE,
           IT_LINE TYPE TABLE OF TY_LINE.
    EVENT = CL_HTMLB_MANAGER=>GET_EVENT_EX( REQUEST ).
    IF EVENT IS NOT INITIAL AND EVENT->EVENT_NAME = HTMLB_EVENTS=>FILEUPLOAD.
      DATA ?= CL_HTMLB_MANAGER=>GET_DATA( REQUEST = RUNTIME->SERVER->REQUEST NAME = 'fileUpload' ID = 'uploadID' ).
      FILE_NAME = DATA->FILE_NAME.
      FILE_PATH = FILE_NAME.
      IF DATA IS NOT INITIAL.
        CALL FUNCTION'SCMS_XSTRING_TO_BINARY'
         EXPORTING BUFFER = DATA->FILE_CONTENT
         IMPORTING OUTPUT_LENGTH = LV_OUTPUT_LENGTH
         TABLES BINARY_TAB = LT_BINARY_TAB .
        CALL FUNCTION'SCMS_BINARY_TO_STRING'
        EXPORTING INPUT_LENGTH = LV_OUTPUT_LENGTH
         IMPORTING TEXT_BUFFER = LV_TEXT_BUFFER
         TABLES
         BINARY_TAB = LT_BINARY_TAB.
        IF SY-SUBRC = 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
        SPLIT LV_TEXT_BUFFER AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO TABLE IT_LINE.
        IF SY-SUBRC = 0.
          LOOP AT IT_LINE INTO WA_LINE.
           SPLIT WA_LINE AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB
            split wa_line at ','
            INTO WA_TAB-FIELD1 WA_TAB-FIELD2 WA_TAB-FIELD3 WA_TAB-FIELD4 WA_TAB-FIELD5.
            append wa_tab to it_tab.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDIF.

    Also, I missed another point.
    In the folder c:\dbdata I have a number of CSV files on the user frontend. I would like the BSP application to get the list of files in the folder and process them one after the other. How can I get the list of files on the folder in the user PC and how to process them one after the other.
    I want the form to display only the default folder and once I press on upload it must process all files and display the status of processing on the same page.
    Please kindly share ideas how I can implement this app.
    Thanks
    Karen

  • When I send out mail from MS Outlook enterprise account in the office to my Mac at home they are received as "winmail.dat" files.  Even if I perform a "save as" to the correct file name the file format is still not recognized.  Why is this happening!?

    When I send out mail from MS Outlook enterprise account in the office to my Mac at home they are received as "winmail.dat" files.  Even if I perform a "save as" to the correct file name the file format is still not recognized.  Why is this happening!?

    http://www.joshjacob.com/mac-development/tnef.php

  • I have over 60,000 photos in my iPhoto.  When my screen saver comes on it randomly shows certain photos.  Often, these photos are old and I in turn find the desire to print said photo.  Is there a way the screen saver can convey a photo file name as well?

    I have over 20,000 photos in my iPhoto.  When my screen saver comes on it randomly shows certain photos.  Often, these photos are old and I in turn find the desire to print said photo.  Is there a way the screen saver can convey a photo file name or location as well?  Can I create a slideshow of all my photos to cycle through at leisure with photo info?  Lastly,  I know I have duplicates and have tried numerous software programs to delete duplicates to no avail.  What do you recommend as a method to reduce duplicates on iphoto?  Thanks for your time.

    1. No.
    2. Yes.
    3. Some apps for dealing with duplicates in iPhoto
    iPhoto Library Manager
    Duplicate Annihilator
    Decliner
    iPhoto Duplicate Cleaner

Maybe you are looking for

  • My bookmarks keep disappearing on my ipad 2

    I am not sure why, but my bookmarks have disappeared twice now in the last 24 hours.

  • Handler

    Hello I have tow JscrollPane ,J1 and J2 and I want that when J1 up or down his scrollBar j2 up or down too. I have make a handler for J1 that when there is a event of scroll pane this move the scrollbar of J2,good, but this produce exceptions and the

  • Bizarre situation with the "Where used list" for a table updated by FB50

    Hello all, I use the "where used list" (all check boxes selected) function in SE11 to find out where and how the table FMGLFLEXT (General Ledger Public Sector: Total) is being used and updated. All I get is a reference to a function module, namely  

  • Unable to Open Emails on Mac book pro?

    I am having trouble with My MAC BOOK PRO! I am being asked to Input My password for My email access. Have been getting my emails fine On my IPHONE 5S. My last email was On the 19th of dec. I have input My password many times TO be rejected access via

  • Error opening file, then opens

    Frequently, when I click on a file to open it I get the error message below.  It may be from any app - CAD, iWorks, OpenOffice, iPhoto.  Sometimes I am inside the app, such as Keynote  and use Open Recent Files, such as the example in the picture. Wh