Save As dialog box

may i know how to do the save as function example to save, once i click the save as, it would allow me to save the current file to another filename?
thanks!

Look at the java.io package of how to write to files. A simple example is given below
PrintWriter writer = new PrintWriter( new BufferedWriter( new FileWriter( "file.txt" ) ) );
writer.println("Hello");
writer.close();--------
FeedFeeds : Read news and blogs the easy way!
http://www.feedfeeds.com

Similar Messages

  • In javascript how to invoke save as dialog box ,which saves .pdf files only

    Through javascript i generated a save as dialog box. the main problem is , it is only saving .html and .doc files by default. how to restrict it to save only .pdf files.
    the code i used is
    function SaveFile(fname)
    document.execCommand('SaveAs', null, fname)
    <input type="button" value ="save" onclick="SaveFile('');">
    /**********************************************************************/

    this is actually a Java forum its slightly different from javascript
    but try this not sure if it helps
    <input type="button" value ="save" onclick="SaveFile('.pdf');">

  • How can I add form field value to the file name in save as dialog box

    I do not want the form to be saved automatically, just want the form to auto populate the "file name" only.
    A little background on the forms I want to use:  My company has 70 retail outlets, I'll use one of our pdf forms called an "Incident Report" as an example.  I would like for a store manager to be able to complete the form, then email the form to the main office (I already have javascript to add field values and form name to the email subject line), once the main office receives it, I want for them to be able to file the pdf electronically on our server.  We have mutliple forms that we use so I do not want any of the forms to automatically save anywhere, (at this time anyway) I just want the office personnel to be able to click "save as" (or whatever they will need to click) and the form automatically add certain field values from the pdf they have received, of which will be different each time the form is sent to the office (Date, store #, employee name etc.) in addition to the name of the form in the "File name" of the "Save As" dialog box.  The main office employees will decide into which server file the pdf should be saved.
    I'm using Acrobat 8 professional, the stores and office personnel use Adobe reader.
    One little note:  We currently print and file a lot of paper on a daily bases, as soon as I can get this to work, we are going green.
    Me and a lot of trees in this will really apprecitate any help you can give with this!  :-)

    You might want to take a look at the document "Developing Acrobat Applications Using JavaScript" (js_developer_guide.pdf) which is part of the Adobe Acrobat SDK, which can be downloaded here. Read the "Privileged versus non-privileged context" (p. 45ff.). You will find an example for "Executing privileged methods in a non-privileged context". Should be almost exactly what you are looking for.
    Small Outline: For security reasons ("the user always has to know what's going on") you are not allowed to use the "Doc.saveAs"-method without the user permission (--> in a non-privileged context). In order to reach the goal of a privileged context you can use a trusted function. You do this by creating a JavaScript file (*.js) in either the Application-JavaScript-Folder (default location on Windows systems: "%ProgramFiles%\Adobe\Acrobat 10.0\Acrobat\Javascripts") or the User-JavaScript-Folder (default location on Windows systems: "%AppData%\Adobe\Acrobat\10.0\JavaScripts"). Add the following content to the new file:
    myTrustedBrowseForDoc = app.trustedFunction( function ( oArgs ) {
         app.beginPriv();
              var myTrustedRetn = app.browseForDoc( oArgs );
         app.endPriv();
         return myTrustedRetn;
    myTrustedSaveAs = app.trustedFunction( function ( doc, oArgs ) {
         app.beginPriv();
              var myTrustedRetn = doc.saveAs( oArgs );
         app.endPriv();
         return myTrustedRetn;
    The developer guide actually wants you to add this content to the existing "config.js" file. I recommend creating a new file, since its easier to deploy in a network. Either way, every client/user who needs to be able to save documents this way, needs this JavaScript Code in his Application/User-JavaScript-Folder.
    Within the Acrobat Document, which you want to obtain a certain file name, you can now use the trusted functions "myTrustedBrowseForDoc" and "myTrustedSaveAs" to store the file. To call the trusted functions and deliver the file name you can either you use a form field (button) or you add a new menu item. Add the following JavaScript Action to the button/menu item and change "Roller Coaster" to the name of the field which contains the value which you want to become the new file name:
    var fileName = this.getField("Roller Coaster").valueAsString;
    try {
         var oRetn = myTrustedBrowseForDoc({bSave: true, cFilenameInit: fileName + ".pdf"});
         try {
              myTrustedSaveAs(this, { cPath: oRetn.cPath, cFS:oRetn.cFS });
         catch(e) {
              console.println("Save not allowed, perhaps readonly.");
    catch(e) {
    console.println("User cancelled Save As dialog box");
    Good Luck!

  • 'Save as Type' box in 'Save As' dialog box

    I recently downloaded 'Rocket PDF' and now if I try to save any PDF. document, the only choices in the 'save as type' box are 'Rocket PDF' or 'All files'. No more 'Adobe Reader PDF. appears as a choice. I uninstalled 'Rocket PDF' and in the 'Default changes' I put 'Adobe Reader as the default to open 'PDF.'. Still, the only choices on the 'save as type ' are 'Rocket PDF' or 'All files'! How do I get Adobe Reader PDF' back as a choice in the 'save as type' box and delete 'Rocket PDF' as a choice?

    Sorry I wasn't clear! When I try to save a 'PDF' file the "save as" dialog box opens. At the bottom the 'file name'is listed and below that it says, "save as type". You then pick what file type you want, like Adobe Reader for PDF. It used to say Adobe Reader as one of the choices but when I downloaded "Rocket PDF" it only says "Rocket PDF or "all files" as the only choices to save the document, no more Adobe Reader as a choice. I have deleted Rocket PDF and under 'default programs (Start button) I have set the "Pdf. files to open with Adobe Reader. Rocket PDF is still listed or' all files', nothing else! How can I get Adobe Reader as a choice back in the 'save as type' box?
    Thanks for any help.

  • Save Open dialog box opening very slow

    I have windows 7 professional 64bit OS. whenever i try to open/save as dialog box it appears very slow, then it will say it is not responding then after 10-15sec it will come alive.
    Need help!!!!!!

    Blair,
    I followed your suggestions above....reset IE ...clean boot. Didn't solve the problem.  (had trouble making that MSCONFIG window bigger !? <wink>)
    Problem still exists.  And to be clear, here is the problem(s) ...I believe they are all interrelated.
    #1.  I end the explorer.exe process and restart it.  Run Explorer and start clicking folders in my FAVORITES.  System hangs for about 10 seconds before it catches up.
    Alternatly, after a explorer.exe restart, if I run explorer and start clicking down through folders from the C: drive, there is no hang.   SUSPECT - some sort of file for favorites needs to be rebuilt?!
    #2. Open MS Word.  Type a few letters.  Select File/Save.  Most icons under Favorites are white.  Trying clicking more than one, but system hangs for ten seconds until icons fill in.
    #3.  WINDOWS button, start typing in the search INTERNET....5-10 seconds before Internet Explorer (and other INT* things show up.!  Usually this is instantaneous.
    System Info:
    Great machine and fast for over a year, and now this started FYI.
    OS Name    Microsoft Windows 7 Home Premium
    Version    6.1.7601 Service Pack 1 Build 7601
    Dell System XPS L321X
    x64-based PC
    Intel(R) Core(TM) i5-2467M CPU @ 1.60GHz, 1601 Mhz, 2 Core(s), 4 Logical Processor(s)
    4 gb Ram
    256 SSD
    ACTIONS TAKEN:  (estimated 30 reboots today)
    - Ensure all folders are GENERAL under properties
    - Advanced Attributes - turned off "allow files on this drive to have contents indexed in addition to file properties"
    - Checked Indexed location is C: drive/ User/ just my data areas....reindexed
    - Tried reboot with Windows Search service disabled....no help.  Turned back on.
    - Tried MS Essentials off.  Tried Firewall off
    - Rebuilt ICONCACHE - was 8mb, now less 450kb
    - Archived OUTLOOK down to a reasonable size (and had to do the manual compress to reduce the file size after)
    - turned off some Windows visual effects.
    - Turned off Dropbox from autostarting....this was before I tried the Clean Boot
    - turned by ON (default)  in Startup - though it has Unknown MFG and no details  :~(   , i found that it likely is needed for my 64 bit machine.
    Any help would be appreciated.
    Steve

  • How can I get the "Open" and "Save As" dialog boxes to open at larger than their default size?

    How can I get the "Open" and "Save As" dialog boxes to open at larger than their default size?  I would like them to open at the size they were previously resized like they used to in previous operating systems.  They currently open at a very small size and the first colum is only a few letters wide necessitating a resize practically every time one wants to use it.  Any help would be appreciated.

    hi Prasanth,
    select werks matnr from ZVSCHDRUN into table it_plant.
    sort it_plant by matnr werks.
    select
            vbeln
            posnr
            matnr
            werks
            erdat
            kbmeng
            vrkme
            from vbap
            into table it_vbap
            for all entries in it_plant
            where matnr = it_plant-matnr and
                  werks = it_plant-werks.
    and again i have to write one more select query for vbup.
    am i right?

  • 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

  • How to open a 'Save As' Dialog box in JSP?

    Hi all, i need to export a CSV file. A button is provided to the user to choose the directory to save the file. My problem is how to open a 'Save As' dialog box in JSP?
    Thanks in advance

    Hi,
    Below is my full code to download fiel but still the Save Dialog box still not show..
    <%@ taglib prefix="cs" uri="futuretense_cs/ftcs1_0.tld"
    %><%@ taglib prefix="asset" uri="futuretense_cs/asset.tld"
    %><%@ taglib prefix="assetset" uri="futuretense_cs/assetset.tld"
    %><%@ taglib prefix="commercecontext" uri="futuretense_cs/commercecontext.tld"
    %><%@ taglib prefix="ics" uri="futuretense_cs/ics.tld"
    %><%@ taglib prefix="listobject" uri="futuretense_cs/listobject.tld"
    %><%@ taglib prefix="render" uri="futuretense_cs/render.tld"
    %><%@ taglib prefix="siteplan" uri="futuretense_cs/siteplan.tld"
    %><%@ taglib prefix="searchstate" uri="futuretense_cs/searchstate.tld"
    %><%@ taglib prefix="locale" uri="futuretense_cs/locale1.tld"
    %><%@ taglib prefix="dateformat" uri="futuretense_cs/dateformat.tld"
    %><%@ taglib prefix="blobservice" uri="futuretense_cs/blobservice.tld"
    %><%@ taglib prefix="satellite" uri="futuretense_cs/satellite.tld"     
    %><%@ taglib prefix="date" uri="futuretense_cs/date.tld"
    %><%@ page import="COM.FutureTense.Interfaces.*,
    COM.FutureTense.Util.ftMessage,
    COM.FutureTense.Util.ftErrors"
    %><%@ page import="COM.FutureTense.Interfaces.*,
    COM.FutureTense.Util.ftMessage,
    COM.FutureTense.Util.ftErrors"
    %>
    <%@ page language="java" contentType="text/html;charset=UTF-8" %>
    <%@ page import="java.io.File" %>
    <%@ page import="java.io.OutputStream" %>
    <%@ page import="java.io.FileInputStream" %>
    <cs:ftcs><%-- france/test_template
    INPUT
    OUTPUT
    --%>
    <%-- Record dependencies for the Template --%>
    <ics:if condition='<%=ics.GetVar("tid")!=null%>'><ics:then><render:logdep cid='<%=ics.GetVar("tid")%>' c="Template"/></ics:then></ics:if>
    <%
    String fileToFind = request.getParameter("file");
    if(fileToFind == null) return;
    File fname = new File(fileToFind);
    System.out.println("Save As: "+fname.getName() );
    if(!fname.exists()) return;
    FileInputStream istr = null;
    response.setContentType("application/octet-stream;charset=ISO-8859-1");
    response.setHeader("Content-Disposition", "attachment; filename=\"" + fname.getName() + "\";");
    try {
    istr = new FileInputStream(fname);
    int curByte=-1;
    while( (curByte=istr.read()) !=-1){
    out.write(curByte);
    out.flush();
    } catch(Exception ex){
    ex.printStackTrace(System.out);
    } finally{
    try {
    if(istr!=null) istr.close();
    } catch(Exception ex){
    System.out.println("Major Error Releasing Streams: "+ex.toString());
    try {
    response.flushBuffer();
    } catch(Exception ex){
    System.out.println("Error flushing the Response: "+ex.toString());
    %>
    </cs:ftcs>
    Can anybody help me with this???
    Thank you in advance.

  • How come the "save as" dialog box keeps popping up whenever I try to use alt codes?

    I type with diacritical marks regularly but recently, when I press and hold Fn + Alt + the numerical code, it brings up the "save as" dialog box. This seems to be a Firefox-specific issue because this doesn't happen on Microsoft Word + other programs. I am wondering how to disable this "save as" dialog box shortcut, or how to just get the alt codes to work.

    Hm, this is the list of add-ons that are currently enabled on my browser:
    <br><br>
    Dictionnaire française moderne (it can't be this one because I just installed it today)<br>
    Java Console 6.0.18<br>
    Java Console 6.0.25<br>
    Java Console 6.0.20<br>
    Java Console 6.0.24<br>
    pdfit (doesn't seem like it's this one either)<br><br>
    Conclusion: might it be one of the Java Consoles?
    Thanks!

  • How to Display save as dialog box.

    Hai all,
    am having a jsp page in which i display some values in Table. if i click a button it should show a save as dialog box, from that i should give a file name then all the content must be save in that file name. Any one give idea to open save as dialogbox from button click.
    Thanks.

    You can t do what you want.
    But you can do something similar..
    In stead of save as do a submit to a servlet and have you servlet download the file to the client
    download by setting your contenttype to
    response.setHeader("Content-Disposition", "attachment; name=\""+filename+"\"; filename=\""+filename+"\";");

  • How to give save as dialog box using servlet?

    hello,
    i am building one application where i am generatinfreport in excel format.
    now the file generated is output.xsl.
    this is in c:\bea\wlserver6.1 directory.
    now i want to write a servelt get this file from location given above and give user Save As dialog box.
    can anybody provice me sample code from this....
    thank you.

    Hi,
    Hope the following code snippet helps, Put this in your doGet/doPost method.
    FileInputStream fileInputStream = null;
    ServletOutputStream out = response.getOutputStream();
    String srcfile = "c:\bea\wlserver6.1\myxsl.xsl";
    String destfile = "myxsl.xsl";
    response.setContentType("text/xml");
    response.setHeader("Content-Disposition","attachment; destfile=\""+ filename + "\"");
    try {
         fileInputStream =new FileInputStream(srcfile);
         int i;
         while ((i=fileInputStream.read()) != -1) {
              out.write(i);
    }catch (Exception e){
         System.err.println (e);
    }finally{     
         fileInputStream.close();
         out.close();     
    Good Luck,
    Rajesh

  • How to get save as dialog box.

    i want to open a "save as" dialog box from file menu.and i want to specify by myself which type of item should be in "Save as type" drop box in the save as dialog box.how to do it???????plz help........thanx in adv.

    I believe that the Sun tutorial over [How To Use File Choosers|http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html] will be able to give you the answer for this one. This and the JFileChooser API and other associated APIs.

  • InDesign "Save As" dialog box for every operation in INDB book file; updating page numbers, etc.

    So I haven't used INDB files in awhile in InDesign, and today was the first time I attempted to adjust an old INDB (created originally with CS5).  For every operation of adjusting the book file, such as updating page/section number or adding/removing an INDD file I get a Save As dialog box for each constiuent INDD file.  This is quite annoying since the book has lots of INDDs, and I have to click through the tedious save as with each.  I previously worked with INDBs in CS5, and never encountered this, there was no need to save each INDD in the book just to update the page numbers.  I tried creating a new INDB in CS5.5 thinking that maybe it was because I was working from a file created with an older version of InDesign.  Does anyone know if there is a way to suppress the Save As dialog?  Another thing I noticed that is supremely frustrating is that this new build of InDesign doesn't default to saving the file in its original location, and I have unwittingly ended up saving files in other places, only to later realize it.  I am using InDesign CS5.5 Ver. 7.5.2 on Mac OSX 10.7.3  Any help is greatly appreciated. 

    It will only happen once (and frankly, what you are doing is a very bad idea).
    When you open the old book in CS5, you are converting to the new format. All of the legacy files also need to be converted, even if added to a new book in CS5.5, hence the Save As since ID will not overwrite the old versions until you tell it to (and that's the bad idea). I strongly recommend (though it's too late for any books you've already updated and overwritten) that you either continue to edit in the old version, or that you take the time to open each file in the original version if it's older than CS5, then export to interchange format (.inx or .idml, depending on version), open those files in CS5.5, save with new names so you don't overwrite anything, then add to a new book and proceed.
    One of the reasons I recommend this seemingly time-consuming approach is that there are too many reports (another one yesterday) of some sort of problem that pops up late in the editing cycle when converting legacy files to CS5/5.5 by opening them directly and saving. This is a belt and suspenders insurance approach, and is far less labor intensive than starting over, which might end up being your other option down the road if something goes wrong.

  • How do I force Firefox (6v02) to stop showing thumbnails of existing file(s) in the save-as dialog box?

    I save files associated with similar objects using similar names (just a different extension, or numeric sequence). The save-as dialog box shows a list of existing files. When I choose one, with the intention of changing the file extension or the numeric sequence (e.g., choose 'file001.jpg' in order to rename the new file to be saved 'file002.mpg') the thumbnail associated with the one I select is shown on the right. I neither want nor need this time-consuming & memory-consuming process to take place. I would like to be able to disable this feature in order to allow me to do what I want directly and faster (P3/866MHz/512MB).

    Perhaps, but the problem is I don't really know what to look for. I've tried doing a keyword search of the AIprefs file to find where ICC profiles and compression could be located but I couldn't find anything. Does anyone know what they are called and what I should modify?

  • How do you customise the finder "save as" dialog box?

    Hi
    I get a lot of email with attachments that I need to work on - word documents and powerpoint slides mainly.
    I am still running Snow Leopard and I think Finder is very frustrating. Has it been improved in this aspect in Mountain Lion?
    Firstly, if I look at the email and click the "save" box next to the attachment, it immediately puts the attachment in the download folder. I dont want that. I want to be given a dialog box giving me options where to save the file in my heirachy of folders that I have set up by client and project. Sending it to the download folder is a naff default, but I cannot find a way to change this default?
    Secondly, if i scroll down to the bottom of the email to see the attached file, and then right click to "save as", I get a dialog that is devoid of all the customisation options I have chosen for the standard finder view. For examply, I cannot get the "path" to be displayed as part of the "save as" dialog box.
    This is all pretty fundamental stuff, and Windows have been able to offer much better customisation and default setting in Windows Explorer for years. WHy is OSX so far behind in this aspect?
    Is Lion better?
    Do I have to fork out an additional $35 for each of my 3 macs to buy "Default Folder" just to get something that should be basic workflow management within the OSX  
    Am I missing something?

    Thanks Jeffry
    Yes I am using the expanded save dialog.
    Thanks for pointing out how to change the default save location away from the downloads folder.
    What I really want, though, is for when I press the "save" button next to an attachment in the email, then I want to be given the choice of where to save it, and easy ways of navigating to my recent folders, favourite folders etc. Each file I save will need to go to a folder dependent upon which client it is, so just saving then all by default into "Documents" for example, means that after saving them, I then need to go and move them to the correct location.
    How to I get to have a choice if where to save whenever I press the SAVE button 

  • "Save As" Dialog Box in Acrobat X/Windows 7

    One of the best things about Windows Vista and 7 is the much-expanded and much-improved Open/Save As dialog boxes.  They are much more efficient and much easier to work with, especially as you build huge document libraries.
    When I installed Acrobat X I was very excited by the assumption that a post-Windows 7 Acrobat build would utilize Windows 7 dialog boxes.  Oh was I wrong.  It seems that Acrobat X still utilizes the old Windows 2000/Windows XP dialog boxes.
    Does anyone know of a way to force Acrobat to use 21st century dialog boxes?  Or am I doomed to remain stuck in 1990s file navigation hell?
    Thanks.

    This is really unbelieveable that Adobe is apparently unable to detect the version of Windows that they are running on and alter the Dialog box to suit! I can only imagine that their code base is so bad and riddled with old legacy stuff that their developers are unable to make this change without breaking everything. In which case, why even bother to bump to a new major version of X ?
    Why do we support this?
    Chris Cox, your answer of "We've been trying to - but we still have to support XP and Vista." is unacceptable. You know how to detect that you are running on Windows 7 and you can still support XP and Vista. Any developer out there know this.
    MAKE THIS CHANGE NOW !!

Maybe you are looking for

  • Nokia pro cam for lumia 920

    Hi I have a nokia Lumia 920, I updated it to amber using nokia software updated for retail. At that time I was able to install nokia pro cam, but I had to reinstall amber because of minor problems and when I tried re installing pro cam it said "this

  • New computer, new iTunes?

    I bought a new computer recently. I currently have iTunes 6.0.5.20 on my laptop, but I want to move it to my new system. The problem I suspect is that the CD that came with my 30G iPod is likely an older version (of 6.0, but still, older). If I insta

  • Loud Superdrive, CD Recordings Fuzzy

    My SuperDrive is at TIMES, very loud when I put in a CD or DVD; and, at other times is quiet. There have been no problems READING disks, but when burning CDs (audio from itunes), some of the songs are fuzzy and skip. One DVD recording errored as well

  • How can I fix PSE3s styles file?

    When I launch PSE3 a window shows up that says "this styles file is bad or corrupt", so it can't open up at all and the PSE3 launcher will just stay on my screen. I haven't downloaded any custom styles, I deleted Grant's tools just in case it caused

  • Unstable

    Pacman wont refresh with unstable selected.. In pacman.conf i uncommented an unstable repo but when i do pacman -Sy fluxbox-devel it first syncs but only with current and extra...