Open Save File Dialog with Default Path

Hi All,
I want to open a "Save File Dialog " with some default path.
Like when user run that script I want to open  a "Save As" dialog box with default path "/Volumes/<shared name>/<folder name>/.. ."
I am using
File.SaveDialog(prompt, filter);
but it doesn't open to the location by default that I want to open.
Thanks
Harsh

look at this thread to see if it helps
http://forums.adobe.com/thread/1077267?tstart=0

Similar Messages

  • Save File Dialog with PDF servlet

    I've looked through messages posted relavent to this topic but I'm having trouble finding a solution to my particular problem.
    I'm running a servlet that is used to dynamically generate completed business documents using given a customer number. The servlet loads the customer information, generates a collection of forms as a single pdf document and sends it back to the browser.
    The problem is, the servlet doesn't work in one of the scenarios that is required: we email a link to an adminstrator that clicks on the link to view the documents, e.g.:
    http://myhost/myservlet.srv?custno=1234
    When you click on the link in the email (using Outlook), you always get the "save/open file" dialog box. If you click cancel AND LEAVE THE BROWSER OPEN and click on the link again in the email, everything works fine--the pdf document opens up in Adobe. It's just when the OS has to launch a new browser window that it doesn't work and you get the dialog.
    I've tried using the content disposition header (both inline and attachment). I've tried setting the content length. I've tried adding no cache headers. Nothing seems to work for this particular use case.
    Anybody seen this before? I could really use a hint.

    There are two thing that u can do.
    First try setting the contenttype as text/html and see
    if it works. The reason its opening a download box is
    that the stream is coming as a .pdf header and browser
    is not getting a plug in for the same.
    another way is a bit patchy.
    you have to set some kind of parameter with your url
    that u send in e-mail.
    then depending on this parameter. first send a
    javascript to reload the page.
    something like.
    if (request.getParameter("isMail))
    //send
    javascript:document.location().substring(0,indexOf('&is
    ail');
    else
    //your normal processing
    this way browser will actually resubmit the request
    from browser itself and will resume your normal
    processing.
    Regards
    KuldeepThis is kind of what we finally did. We decided that rather than have the url point directly at the servlet, we had the link point at a jsp that simply digests the parameters and constructs a new url to the servlet and then sends a redirect to the browser to the new url.

  • Open/Save File Dialog Box comes up, then does not respond for a long time or not at all

    I will click a link for a download and the box will pop up saying
    "You have chosen to open "blahblah.blah.blah
    Which is a: blah file
    From: www.randomsite.com
    What should Firefox do with this file?
    Open with
    Save File"
    At this point other than being able to see the box, it is as though it doesn't exist. I can't click okay or cancel or choose what to do. Sometimes after a few minutes it will suddenly work, other times it will just remain until Firefox closes.

    You can also try to clean install the new version after deleting the [http://kb.mozillazine.org/Profile_folder Profile Folder] as well as the [http://kb.mozillazine.org/Installation_directory Installation Folder.] Please see [https://support.mozilla.org/en-US/kb/Backing%20up%20your%20information?s=backup&r=1&e=sph&as=s this] for backing up important info. The '''places.sqlite''' file stores the bookmarks and history, the '''key3.db''' + '''siqnons.sqlite''' files are needed to successfully restore the saved passwords etc.
    [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Files]
    [https://www.mozilla.org/en-US/firefox/new/ Firefox Latest]

  • Problem in opening Save file Dialog..

    Hi all,
    I have a table, i want to save the table data in in csv format.So my problem starts here that when i click on button to save table data a Save dialog should be displayed where i can select path and save file.
    So please make it possible ASAP.

    Is this a Java Studio Creator JSF table component related question? If you are you talking about saving the data from the table at design time or when you run the application and you want to save the table data from the table displayed in the browser?
    Please clarify.
    thanks,
    Sandip

  • Print Preview Opens "Save File" Dialog

    A week or so ago (possibly related to my install of Snow Leopard, not quite sure), when I hit Preview in a Print dialog, I'm taken to a "Save" dialog before Preview opens with the file for preview. Before it would save it to a temp location somewhere and just open it for me.
    Feels like the temp location it was writing to before is no longer available, but I'm not really sure where that is to check.
    Any suggestions?
    Cheers.
    Adam

    CMD+P on Safari or TextEdit brings up a print dialog box, clicking on PDF button (there's no preview button), reveals the drop down menu, wherein the first option is Open PDF in Preview. This might be a change from Leopard, but I'm not on it at the moment, so can't check. There is a Preview button if you're using MS Word '04 ('08 probably works the same) and it pops up in Preview.

  • I'm not able to resize the sidebar in the "Open/Save File" dialog.

    It's too wide as default setting.

    If the sidebar cannot be made narrower, you might make the entire file selector larger.

  • How to open a save file dialog box in form

    hi
    all
    I have prob in form desing , i have open the save file dialog box , how to open a save dialog box
    and path of the select file to save in disk
    help
    thx

    hi
    user this query when-button-pressed trigger
    :txtfile := GET_FILE_NAME(directory_name =>'d:\ali_raza\backup\', file_filter=> 'DMP Files (*.dmp)|*.dmp|');
    Rizwan

  • Blank page shown instead of Open/Save As dialog box-CSV file download in IE

    I am migrating an application hosted earlier on Oracle 9iAS (9.0.3.1 BP1) to OracleAS 10g (10.1.3) with Struts 1.2.9. While the below JSP code worked for the earlier s/w stack when accessed using IE 5.5 SP2 or above, a blank page is displayed with the new s/w stack. What I mean by "worked earlier" is this. A "Open/Save As" dialog box would appear. Trying to "Open" would open a new IE window launching MS Excel and displaying correct data. Trying to "Save As" would display correct filename and extension in the dialog box.
    <%@page autoFlush="false" contentType="application/x-filler"%>
    <%
    try
    String fileName = "ABC.CSV";
    String strData = "A,B,C";
    response.setContentLength(strData.length());
    response.setHeader("Content-Type","application/octet-stream");
    response.setHeader("Content-Disposition","inline;filename="+fileName);
    ServletOutputStream ouputStream = response.getOutputStream();
    ouputStream.write(strData.getBytes(), 0, strData.getBytes().length);
    ouputStream.flush();
    ouputStream.close();
    catch(Exception e)
    %>
    I tried some changes listed below:
    1. Deliberately introduced compilation errors in the JSP code.
    2. Changed contentType="application/x-filler" to various MIME types like application/x-download, application/vnd.ms-excel, removing it altogether.
    3. Commented out response.setHeader("Content-Type","application/octet-stream") and also tried other MIME types related to CSV/Excel.
    4. Changed Content-Disposition from inline to attachment.
    Each of the above resulted in an unacceptable behaviour compared with the earlier state:
    1. Blank page shown as if nothing was happening even in case of deliberate incorrect JSP syntax.
    2. Dialog box did show up with some combinations. But on trying to "Open" or "Save As", the dialog box shows up a second time. Then while trying to "Open", the contents get opened either inline or in MS Excel but with some additional garbage data like source file name.jsp etc. While trying to "Save As" the file name and extension take on the pattern <URL_Pattern>.htm where URL_Pattern would be "DOWNLOAD_ACTION.do".
    Some other information:
    1. This code works when accessed from desktop local container (Win 2000) but not when deployed on Unix env (HP-UX B.11.11.0109).
    2. Latest patchsets are installed for IE.
    3. The existing application is designed to work for ONLY IE 5.5 SP2 or above, so I haven't tried with other browsers. I have tried both IE 5.5 SP2 and 6.0 SP1.
    Any help in this regard will be highly appreciated.
    Thanks a lot for your valuable time..

    I have made it to work with the below changes:
    1. Changed the URL pattern for <filter-mapping> for *.jsp to /*.jsp
    2. Added <dispatcher>REQUEST</dispatcher> and <dispatcher>FORWARD</dispatcher>
    3. Everything else (code-wise) is as before.
    Because of these changes, the filter, wherein some headers are being added to the response, is being invoked appropriately now.
    Thanks for you time and suggestion though...

  • Automation Question: How do I work with an open 'upload file' dialog?

    Preamble:
    Was a very experienced VBS automation guy, this is my first emersion into the wonderful world of C# automation. Using Selenium WebDiver, I have successfully logged into a web page, filled out a few web forms, clicked on the 'add image' button and am
    now faced with an open 'upload file' dialog. Pretty sure the namespace I need is system.windows.forms.OpenFileDialog so added the reference to my project.
    Question:
    All the examples on the web seem to relate to app development and not test automation. But, I need to automate this web application and all that's left is the image upload. What do I do when faced with an
    already opened 'upload file' dialog? I know the image and path, how do I automate the process of placing the full path into the dialog and clicking the OK button or alternately, enter key?
    Thank you!

    I doubt that you need System.Windows.Forms.OpenFileDialog, the browser isn't written using WinForms and that dialog is a Win32 native dialog.
    Maybe you should post this in the Selenium Users
    group? It has little to do with C#, it's more about how Selenium interacts with the browser.

  • "An error occurred while opening the file dialog. Please save your presentation, exit, and restart PowerPoint."

    In PowerPoint 2013 on Windows 7 - 64 bit, when
    File / Save as is selected, an error message comes up stating, "An error occurred while opening the file dialog. Please save your presentation, exit, and restart PowerPoint." This is an intermittent issue and also
    affects Excel 2013. I have tried repairing it, done windows update and also uninstalled and reinstalled but no luck. I have researched this issue but it relates to Office 2007 and 2010 and the resolution does not support 2013.
    Has anyone come across this issue? If so how did you resolve it?
    Many thanks….

    Hi,
    You mentioned you tried some steps but I'm not sure what they are, you may try my suggestion to resolve this issue, follow these steps:
    Click Start, right-click Computer, click
    Properties, and then click Advanced system settings.
    On the Advanced tab, click Environment Variables.
    Locate and select the __COMPAT_LAYER variable, and then click Edit.
    Set the value of the __COMPAT_LAYER variable to EnableThemes. Or, delete the __COMPAT_LAYER variable.
    If the issue persists, we can troubleshoot this problem in Clean Boot to determine whether background programs are interfering with PowerPoint:
    http://support.microsoft.com/kb/929135
    Regards,
    Melon Chen
    TechNet Community Support

  • How do i disable the open/save image dialog box in firefox? I want to directly save the image file to the drive.

    How do i disable the open/save image dialog box in firefox? I want to directly save the image file to the drive without clicking on save option everytime when saving an image. I'm using firefox ver 35.0.1 for windows 7.

    Click on the Firefox menu. Then click "Options". Go to "Applications" tab. Search for jpg and png file type. You will find they have "Always ask" action attribute. Change it to "Save file".
    Hope it will work fine for you.

  • How to incorporate File name and timestamp automatically into select and save file dialog box?

    Hello,
    i am trying to incorporate the file name which is inputed by the user along with the timestamp into the selected and save file dialog box. Can you help?
    Thanks
    Solved!
    Go to Solution.

    You can pass a default file name to the 'File Dialog' Express VI.
    Use the 'selected path' output to open the file.
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness
    Attachments:
    FileDialog.vi ‏21 KB

  • Suggest a filename extension in a save file dialog

    Hello guys,
    does any of you know, how to suggest the user a certain filename extension in a save file dialog?
    I'm using both the normal save file dialog:
         javax.swing.JFileChooser.showSaveDialog,
    and the Java Web Start save file dialog:
         javax.jnlp.FileSaveService.saveFileDialog.
    For both ways I seem not to be able to suggest the user a certain extension for the filename.
    For the normal dialog, I call setFileFilter on the JFileChooser instance.
    The filter shows up in the dialog, and is used by default, but when the user types a name and approves, the returned filename does not have the extension added.
    Of course I can add the extension programmaticaly, but not when inside the JAWS sandbox.
    For the JAWS dialog, I pass an array containing my extension, but it is ignored as if I didn't specify any extensions. The API specs already say that this parameter "might be ignored by the JNLP Client".
    So how to tell the user what extension to use?
    More people must have encountered this problem.
    I'm making an application that saves and opens xml files and exports html files.
    I'm using this code to test the behavior:import java.io.ByteArrayInputStream;
    import java.io.File;
    import javax.jnlp.FileContents;
    import javax.jnlp.FileSaveService;
    import javax.jnlp.ServiceManager;
    import javax.jnlp.UnavailableServiceException;
    import javax.swing.JFileChooser;
    import javax.swing.filechooser.FileFilter;
    public class ChooseFile
        static final String[] EXTENSIONS = { "xml" };
        static final String DESCRIPTION = "XML files";
        public static void main(String[] args)
         try {
             ServiceManager.lookup("javax.jnlp.FileOpenService");
             // we're running with JAWS
             System.out.println("JAWS filechooser:");
             System.out.println(choose_JAWS());
         catch (UnavailableServiceException x)
             // we're NOT running with JAWS
             System.out.println("normal filechooser:");
             System.out.println(choose_normal());
        static String choose_normal()
         JFileChooser fc = new JFileChooser();
         fc.setFileFilter(new CustomFileFilter(EXTENSIONS, DESCRIPTION));
         if (JFileChooser.APPROVE_OPTION == fc.showSaveDialog(null))
             return "selected " + fc.getSelectedFile().getName();
         else
             return "cancelled";
        static String choose_JAWS()
         try {
             FileSaveService fos = (FileSaveService)ServiceManager.lookup(
                         "javax.jnlp.FileSaveService");
             ByteArrayInputStream stream = new ByteArrayInputStream(new byte[] {});
             FileContents fc = fos.saveFileDialog(null, EXTENSIONS, stream, null);
             if (fc != null)
              return "selected " + fc.getName();
             else
              return "cancelled";
         } catch (Exception x)
             x.printStackTrace();
            return "";
    class CustomFileFilter extends FileFilter
        String[] extensions;
        String description;
        public CustomFileFilter(String[] extensions, String description)
         this.extensions = extensions;
         this.description = description;
        public boolean accept(File f)
         if (f.isDirectory())
             return true;
         String extension = getExtension(f);
            if (extension == null)
                return false;
         for (int i=extensions.length; i-->0; )
             if (extension.equals(extensions))
              return true;
         return false;
    public String getDescription()
         return description;
    private String getExtension(File f)
    String ext = null;
    String s = f.getName();
    int i = s.lastIndexOf('.');
    if (i > 0 && i < s.length() - 1)
    ext = s.substring(i+1).toLowerCase();
    return ext;
    }Any help is greatly appreciated!
    Tom Jansen

    @tjacobs01
    Hi Tom,
    I have a question regarding your classes
    tjacobs.ui.fc.FileExtensionFilter and
    tjacobs.ui.fc.FileChooser.
    When I look at your code, I see the filename extension is appended in showSaveDialog:     public int showSaveDialog(Component c) {
                        setSelectedFile(new File(f.getAbsolutePath() + "." + ((FileExtensionFilter)filter).getType()));
        }It gets the extension by calling getType on the filter. But getType is implemented as:    public String getType () {
            return mExtensionList.get(0).toString();
        }So this returns the first type in the list. It does not check what filetype is selected by the combobox.
    Am I missing something?
    Also, in getDescription:    public String getDescription() {
            if (mDesc == null) {
                mDesc = "";
                for (int i = 0; i < mExtensionList.size(); i++) {
                    mDesc += (i != 0 ? ", " : "") + "." + mExtensionList.get(0).toString();
                mDesc+= " files";
            return mDesc;
        }you seem to iterate through the list, but only take the first entry every iteration.
    Can you explain mExtensionList.get(0)?
    Do you know how to test what type is selected in the JFileChooser's combobox?

  • Save File Dialog KO

    Hi,
    I’m using the Save File Dialog KO (AW7) and would like
    to set a user selectable default directory. I’ve tried
    entering a variable set with the appropriate path in the
    ‘Begin Browsing From - Other’ text box in the KO setup
    but this doesn’t seem to work. Is it possible to do this?
    Thanks.
    Chris

    Instead of using the KO, call the function tmsSaveImageFile()
    in a calc script. (The KO has already loaded the function for you).
    Remember to distribute the u32 with your file, as you would have
    had to with the KO anyhow.
    -- Ron.

  • Edit open/save as dialog window

    is there a way to edit the Open/Save As dialog window shortcuts in DW/FW?
    Thanks
    GN

    Take a look at this:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_17216&sliceId=1
    Bryan Ashcraft (remove BRAIN to reply)
    Web Application Developer
    Wright Medical Technology, Inc.
    Macromedia Certified Dreamweaver Developer
    Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/
    "eliblow" <[email protected]> wrote in
    message
    news:fjkqvv$gig$[email protected]..
    >I would like to create open Save As dialog using
    ColdFusion. The user will
    >be
    > clicking a button and the dialog will pop up asking the
    user if he want to
    > save
    > the file. I know that it can be done using JavaScript,
    but I am not sure
    > how it
    > could be done with CF. any suggestions?
    >
    > Thank you in advance.
    >

Maybe you are looking for