My scanner saves files to Macintosh HD - Private - tmp - my user name. How do I find these files again?

I am not able to find the files my scanner saves to Macintosh HD - Private - tmp - my user name. How do I find these files again? Once I scan something I have to save as and save it to a differnt location, but there are a few files I scaned and did not save as to a new location. I know they are on my computer somewhere but I can't find them.

Under the Finder, in the Go menu, select Go to Folder ...
and enter
/private/var
You will see the tmp folder as well as other folders.
You should be cautious about moving or deleting files inside the /private/var areas because if you do something to the wrong files, your computer may fail to boot. Programs should not be saving files to the /private area that any user needs to access. Something does not sound right about your installation of the scanner.

Similar Messages

  • Macbook Air's hard drive full with files under the 'other' category - how do I find these files and delete them?

    A few days ago a pop up message came up on my screen saying that my hard drive was full, and that I could not install valuable updates because I did not have enough space on my computer. I checked my computer's storage space only to find that 18.22GB of my hard drive was filled with files/programs under the 'other' category. I have deleted all my downloads, most of my pictures and have done virus scans and I still don't have enough room. How do I find out what is in this 'other' category so that I can delete these files (which seem to be hidden) or whatever they may be?

    1. Empty Trash.
        http://support.apple.com/kb/PH10677
    2. Delete "Recovered Messages", if any.
        Hold the option key down and click "Go" menu in the Finder menu bar.
        Select "Library" from the dropdown.
        Library > Mail > V2 > Mailboxes
        Delete "Recovered Messages", if any.
        Empty Trash. Restart.
    3. Repair Disk
        Steps 1 through 7
        http://support.apple.com/kb/PH5836
    4. For info about "Other":
        http://pondini.org/OSX/DiskSpace.html
        http://pondini.org/OSX/LionStorage.html
    Best.

  • How do I get to download and save files again?

    When I try to download or save a file, a file with any format, nothing happens. Only way of getting the file saved is to open it in its designated programme and save it from there. Certain file types can not be saved since they have no programme to open in (like .ies file, for example).
    Changing the file behaviours will not help, it still behaves the same way, i.e. it won´t let me save straight from the browser.

    You really need to provide more information if you expect anybody to help you.

  • Need to open existing .pdf files and add footer, then save files again

    I would like to know how to go about opening a folder containing .pdf files, adding a footer to each file, then saving the file.
    I wanted to check first and see if this would be possible and if so, how to go about doing so.  Is this something that can be accomplished in a batch file?
    We are using Acrobat 5.0 to create the .pdf, but I don't know if we need a newer version to accomplish what I am looking to do.
    Thanks for any info you can give me.

    Hi,
    fwiw - Acrobat 5 (full) supported Batch Sequences.
    The "facility" was provided as an add-on available on the installation media.
    Be well...

  • Premier elements 10 taking up memory on my pc when i am editing onto external hard drive, how do i find these files

    Hi I only had 15 GB of memory left on my pc. I started to edit files saving everything to an external hard drive, then the last one i attempted it wouldnt allow me to. It has eaten up all my memory and i cant find the files, can someone help me with this as im lost :-(
    many thanx in advance

    Hi Trubluru,
    Launch Premiere Elements and open a project.
    Click on edit>preferences>media and clean the cache.
    Then check the free space on the hard disk.
    Thanks

  • How do I find Photoshop CS6 files in iPhoto - Finder?

    I cannot find Photoshop files after I save them (to iPhoto) I will never make that mistake again.
    How do I find these files?
    MacBook Pro w/ Retina ... Mavericks ... 2.9 Ghz Intel i7 dual processors.

    "When you open a file like that in Photoshop, you can easily know its' location in your Finder."
    That's the problem ... the files are invisible, there is no way to click on them or a documents tab.
    If you start with Finder => Pictures => iPhoto Library => error message: "Could not complete your request because Photoshop does not recognize this type of file." This is really silly ... I should be allowed to manage my own files on my own computer. Files don't appear in Bridge, either.
    The folders have file names like: "8RFIXHYyQcqK15+QPf%8Kq" Usually each folder has one image. None is visible unless I use the 'Save As' control.
    I access these files by opening an iPhoto image in Photoshop then using the 'Save As' control which shows view of hidden iPhoto library w/ Photoshop files. It is hard to use the 'Save As' control to manage the files: it's a Save As function and not much else.
    The files and folders simply will not appear in Finder ... or in iPhoto ... or in Photoshop.

  • How do i find quicken files on my computer? i was running quicken under fusion and just want the data files

    I was running quicken 2010 on my iMac using Fusion.  I upgraded to Lion and my version of Fusion is not capable of running on Lion.  I want to copy my Quicken data files onto portable medium but i can't seem to find them using Finder.  How can I find these files?

    As stated, the Quicken files are inside the virtual machine's "hard drive".  If you still have Fusion 3 installed, you might be able to mount the virtual hard drive directly:
    Mounting a virtual disk as a Mac OS volume
    The catch is that the version of MacFUSE that is installed with the version of Fusion you have may not be working on Lion.  If you're willing, you could update MacFUSE and the mounting of the virtual hard drive will work.
    Probably simpler to download and install Fusion 4.  It has a trial mode so if you just need to extract the Quicken documents, you'll be able to at least run the virtual machine for a few days.
    Note: If you do run your virtual machine in the trial, but are not planning to purchase Fusion 4, when prompted, do NOT upgrade your virtual machine.  If you do upgrade the virtual machine, you won't be able to start your virtual machine in older versions of Fusion.

  • Scanner can't save file

    When I try to scan a document I get the message "Problem Scanning. You don't have permission to save to your current destination folder. Please change the destination folder and try again." I have tried a number of destinations on MY computer
    including Destktop and Documents within my user, as well as several detail folders on two different drives. I even tried saving to my OneDrive account. In all cases I get the same message.

    Hi,
    Could you please explain a bit for the scanner here?
    Do we have issues to save files using the other devices/Apps?
    Make sure we have the proper permissions to read/write on the destination place, or switch to admin account and check the issue again.
    Best regards
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Can't save files to Last Folder Used

    I'm scanning items with a Kodak iQsmart3, running under Kodak's oXYgen 2.6.1 scan application. Late last week, the application suddenly stopped saving files to the last folder used. Now I have to re-select the destination folder for each scan.
    I have rebooted the computer several times, and have also re-installed the scan application, but nothing helps the problem. It seems now that the problem may be with OS 10.4.11. I've searched and searched for a solution within the OS, but can't find anything that helps.
    Does anyone have a suggestion on how to proceed? Is there a place where you can check to see if the saving options can be changed?

    Thanks for your suggestion. However, I did as you advised and still cannot save files to the last folder used, as I used to be able to do.
    This is the first time in the 2 1/2 years I've been using this system that I've had any trouble with it. When I opened Disk Utility, it showed me the size and type of three different drives, all identical in manufacture. The first holds the Operating system, and the other two are set up in a Raid Striped set. I selected Macintosh HD under the name of the first drive, since that's the name of the disk on my desktop, and ran the Repair Permissions function, moving the recentitems.plist file to the desktop and rebooting, as per your instructions. Was that the proper area to use or should I have selected the disk description above that?
    (Below is the disk information from the Disk Utility application)
    Disk Description : Hitachi HDS725050KLA360 Media Total Capacity : 465.8 GB (500,107,862,016 Bytes)
    Connection Bus : Serial ATA 2 Write Status : Read/Write
    Connection Type : Internal S.M.A.R.T. Status : Verified
    Connection ID : "Bay 1" Partition Scheme : GUID Partition Table
    (Below is the information on the Macintosh HD folder of that drive.)
    Mount Point : / Capacity : 465.4 GB (499,763,888,128 Bytes)
    Format : Mac OS Extended (Journaled) Available : 226.2 GB (242,855,989,248 Bytes)
    Owners Enabled : Yes Used : 239.3 GB (256,907,898,880 Bytes)
    Number of Folders : 133,296 Number of Files : 684,567

  • Popup with open and save file option

    Hi,
    I have created a button on my page name as "Export File" and created a process and called on "EXPORT FILE" button. I am using utl file in this procedure and i want to download this file and file will be .ics file using for calendar.
    My page process code is
    begin
    pro_create_ical(:P6_START_DATE,:P6_END_DATE);
    end;when i click on export file button it should raise a popup with open and save file option.
    How i can do this?
    Thanks & Regards
    Vedant
    Edited by: Vedant on Jan 25, 2013 1:59 AM
    Edited by: Vedant on Jan 25, 2013 2:00 AM
    Edited by: Vedant on Jan 25, 2013 3:49 AM

    Shiv,
    Have you installed any new Software/Spyware/Virus Scanner etc.Check it out.It might have caused the issue for last 5 days.
    This issue is fixed in Latest Support Package Versions.
    Which Version of Support Package you are using?
    If EP6 <SP19 you will face this issue.
    Just upgrade it to EP6, Support Pack-19,this will be resolved.
    Upgrade of Support Pack wont take much time.you can get the document under http://service.sap.com/instguides
    Hope it helps
    Regards,
    Karthick Eswaran
    *Reward Points for helpful answers.

  • HP officejet pro 8600 unable to save file

    thank you for reading this and helping.
    I have an HP officiate pro 8600 printer/scanner.  I was able to scan and save files to the mac from the network.  Now since the Yosemite and server  upgrade, i am not able to do this.  I have reprobagated rights, created a new share, new user and still am unable to safe a scanned file.
    the error I get is:  Incorrect credentials. 
    Anyone also have this?  What is fix?
    Thank you

    I finally solved it.  Reflecting back on previous message boards I decided to try one last time.  Some posters have found the problem in the Antivirus, Firewall protections.  (By the way, I had even upgraded my router with no luck).I have Norton AntiVirus provided by the cable company.1. I turned off everything in the firewall.  Although this left me vulnerable for a few mintues, I needed a fast test.2. It worked!  I was able to print something immediately.3. I went back into the firewall, turned everything back on but turned off an individual switch within the firewall that said to "share the printer. "4. After turning it off, I was able to print and still have the most important parts of the firewall.This ultimately met my needs.Perhaps HP could:1. Do a better job at beta testing prior to release, including various brands of firewalls.  Is there even a beta test process?2. Provide a better description of the error since all indicators within the drivers say the printer is connected.  There should be a message indicating that it's connected but unable to print due to firewall protections.  

  • Read multiple files and save all into one output file(AGAIN)

    Hi, guys
    I need your help for reading data from multiple files and save the results into one output file. When files are selected from file chooser, my program read the data line by line , do some calculations and save the result into the output. I made an array to store input files and it seems to be working fine, but when it comes to SaveFile() function, issues NullPointException message.
    public class FileReduction1 extends JFrame implements ActionListener
       // GUI definition and layout
        /* ACTION PERFORMED */
        public void actionPerformed(ActionEvent event) {
            if (event.getActionCommand().equals("Open File")) getFileName();
        /* OPEN THE FILE */
        private void getFileName() {
            // Display file dialog so user can select file to open
         JFileChooser fileChooser = new JFileChooser();
         fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
            fileChooser.setMultiSelectionEnabled(true);
         int result = fileChooser.showOpenDialog(this);
         // If cancel button selected return
         if (result == JFileChooser.CANCEL_OPTION) return;
            if (result == JFileChooser.APPROVE_OPTION)
             files = fileChooser.getSelectedFiles();
                textArea.setText("");
                if(files.length>0)
                    filelist="";
                    System.out.println("files length"+files.length);
                    for(int i=0;i<files.length;i++)
                         System.out.println(files.getName());
    filelist+=files[i].getName()+" ,";
    if (checkFileName(files[i]) )
    openButton.setEnabled(true);
    readButton.setEnabled(true);
    textArea.append("file "+files[i].getName()+"is a proper file"+"\n");
    readFile(files[i]);
    textfield.setText(filelist);
    else{JOptionPane.showMessageDialog(this,"Please select file(s)",
                    "Error 5: ",JOptionPane.ERROR_MESSAGE); }
         // Obtain selected file
    /* READ FILE */
    private void readFile(File fileName_in) {
    // Disable read button
    readButton.setEnabled(false);
    // Dimension data structure
         getNumberOfLines(fileName_in);
         data = new String[numLines][4];
         // Read file
         readTheFile(fileName_in);
         // Rnable open button
         openButton.setEnabled(true);
    /* GET NUMBER OF LINES */
    /* Get number of lines in file and prepare data structure. */
    private void getNumberOfLines(File fileName_in) {
    int counter = 0;
         // Open the file
         openFile(fileName_in);
         // Loop through file incrementing counter
         try {
         String line = fileInput.readLine();
         while (line != null) {
         counter++;
              System.out.println("(" + counter + ") " + line);
    line = fileInput.readLine();
         numLines = counter;
    closeFile(fileName_in);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile(fileName_in);
         System.exit(1);
    /* READ FILE */
    private void readTheFile(File fileName_in)
    // Open the file
    //int row=0;
    int col=0;
    openFile(fileName_in);
    System.out.println("Read the file");
    // Loop through file incrementing counter
    try
    String line = fileInput.readLine();
    while (line != null)
    boolean containsDoubles = false;
    double temp;
    String[] lineParts = line.split("\t");
    try
    for (col=0;col<lineParts.length;col++)
    temp=Double.parseDouble(lineParts[col]);
    data[row][col] = lineParts[col];
    containsDoubles = true;
    System.out.print("data["+row+"]["+col+"]="+lineParts[col]+" ");
    } catch (Exception e) {row=0; col=0; temp=0.0;}
    if (containsDoubles){ row++;}
    System.out.println();
    line = fileInput.readLine();
    catch(IOException ioException)
    JOptionPane.showMessageDialog(this,"Error reading File", "Error 5: ",JOptionPane.ERROR_MESSAGE);
    closeFile(fileName_in);
    System.exit(1);
    //System.out.println("length"+data.length);
    closeFile(fileName_in);
    process(fileName_in);
    /* CHECK FILE NAME */
    /* Return flase if selected file is a directory, access is denied or is
    not a file name. */
    private boolean checkFileName(File fileName_in) {
         if (fileName_in.exists()) {
         if (fileName_in.canRead()) {
              if (fileName_in.isFile()) return(true);
              else JOptionPane.showMessageDialog(null,
                        "ERROR 3: File is a directory");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 2: Access denied");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 1: No such file!");
         // Return
         return(false);
    /* OPEN FILE */
    private void openFile(File fileName_in) {
         try {
         // Open file
         FileReader file = new FileReader(fileName_in);
         fileInput = new BufferedReader(file);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
         textArea.append("OPEN FILE\n---------\n");
         textArea.append(fileName_in.getPath());
         textArea.append("\n");
         //System.out.println("File opened successfully");
    /* CLOSE FILE */
    private void closeFile(File fileName_in) {
    if (fileInput != null) {
         try {
              fileInput.close();
         catch (IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File closed");
    private void process(File fileName_in) {
    //getNumberOfLines();
         //data = new String[numLines][3];
         // Read file
    double temp,temp1;
         //readTheFile();
    //System.out.println("row:"+row);
    //int number=data.length;
    //System.out.println(number);
    for (int i=0; i<row; i++)
    temp=Double.parseDouble(data[i][1]);
    sumx+=temp;
    temp1=Double.parseDouble(data[i][3]);
    sumy+=temp1;
    multixy+=(temp*temp1);
    square_x_sum+=(temp*temp);
    square_y_sum+=(temp1*temp1);
    //System.out.println("Sum(x)="+sumx);
    double tempup=(row*multixy)-(sumx*sumy);
    double tempdown=(row*square_x_sum)-(sumx*sumx);
    slope=tempup/tempdown;
    double tempbup=sumy-(slope*sumx);
    intb=tempbup/row;
    double tempside=(row*square_y_sum)-(sumy*sumy);
    double cordown=Math.sqrt(tempdown*tempside);
    corr=tempup/cordown;
    r_sqrt=corr*corr;
         textArea.append("Data for file"+ fileName_in.getName()+" have been processed successfully.");
         textArea.append("\n");
         textArea.append("Please enter output file name including extension.");
    System.out.println("number"+row);
    System.out.println("slope(m)="+slope);
    System.out.println("intecept b="+intb);
    System.out.println("correlation="+corr);
    System.out.println("correlation="+r_sqrt);
    saveFile();
    private void saveFile()
    textArea.append("SAVE FILE\n---------\n");
    if (openFile1())
         try {
              outputToFile();
    catch (IOException ioException) {
              JOptionPane.showMessageDialog(this,"Error Writing to File",
                   "Error",JOptionPane.ERROR_MESSAGE);
    private boolean openFile1 ()
         // search for the file path
    StringBuffer stringpath;
    title=textfield1.getText().trim();
    int temp=fileName_in.getName().length();
    int temp_path=fileName_in.getPath().length();
    int startd=(temp_path-temp);
    stringpath=new StringBuffer(fileName_in.getPath());
    stringpath.delete(startd, temp_path+1);
    //System.out.println("file-path="+temp_path);
    //System.out.println("length-file="+temp);
    path=stringpath.toString();
    fileName_out = new File(path, title);
    //System.out.println(file_out.getName());
    if (fileName_out==null || fileName_out.getName().equals(""))
         JOptionPane.showMessageDialog(this,"Invalid File name",
                   "Invalid File name",JOptionPane.ERROR_MESSAGE);
         return(false);
         else
    try
    boolean created = fileName_out.createNewFile();
    if(created)
    fileOutput = new PrintWriter(new FileWriter(fileName_out));
    fileOutput.println("File Name"+"\t"+"Slope(m)"+"\t"+"y-intercept(b)"+"\t"+"Coefficient(r)"+"\t"+"Correlation(R-Squared)");
    return(true);
    else
    fileOutput = new PrintWriter(new FileWriter(fileName_out,true));
    return(true);
    catch (IOException exc)
    JOptionPane.showMessageDialog(this,"Please enter the file name","Error",JOptionPane.ERROR_MESSAGE);
    return(false);
    private void outputToFile() throws IOException
    // Initial output
         textArea.append("File name = " + fileName_out + "\n");
         // Test if data exists
         if (data != null)
         fileOutput.println(fileName_in.getName() +"\t"+ slope+"\t"+intb+"\t"+corr+"\t"+r_sqrt);
    textArea.append("File output complete\n\n");
         else
    textArea.append("No data\n\n");
         // End by closing file
    initialcomp();
         fileOutput.close();
    private void initialcomp()
    slope=0.0;
    intb=0.0;
    corr=0.0;
    r_sqrt=0.0;
    sumx=0.0; sumy=0.0; multixy=0.0; square_x_sum=0.0; square_y_sum=0.0;
    for(int i=0;i<data.length;i++)
    for(int j=0;j<data[i].length;j++)
    data[i][j]=null;
    /* MAIN METHOD */
    public static void main(String[] args) throws IOException
         // Create instance of class FileChooser
         FileReduction1 newFile = new FileReduction1("File Reduction Program");
         // Make window vissible
         newFile.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         newFile.setSize(500,400);
    newFile.setVisible(true);
    Sorry about the long lines.
    As you can see, all input files saved in array called files, however when OpenFile1() function is called, it take input (fileName_in) as a single file not an array. I'm assuming this causes the exception.
    When there's muptiple inputs, program should take each file from getFileName() to outputToFile() sequentially.
    Does anybody have an idea to solve this?
    Thanks a lot!!

    you naming convention is confussing. you should follows Java naming convention..you have a getXXX but decalred the return type as "void"...get usully means to return something...
    your code is doing too much..and hard to follows..
    1. get the selected files
    for each selected file
    process the file and return the result
    write out the result.
    /** close the precious resource */
    public void closeResource(Reader in){
        if (in != null){
            try{ in.close(); }
            catch (Exception e){}
    /** get the total number of line in a file */
    public int getLineCount(File file) throws IOException{
        BufferedReader in = null;
        int lineCount = 0;
        try{
            in = new BufferedReader(new FileReader(file));
            while ((in.readLine() != null)
                lineCount++;
            return lineCount;
        finally{ closeResource (in);  }
    /** read the file */
    public void processFile(File inFile, File outFile) throws IOException{
        BufferedReader in = null;
        StringBuffer result = new StringBuffer();
        try{
            in = new BufferedReader(new FileReader(inFile));
            String line = null;
            while ((in.readLine() != null){
                .. do something with the line
                result.append(....);
            writeToFile(outFile, result.toString());
        finally{ closeResource (in);  }
    public void writeToFile(File outFile, String result) throws IOException{
        PrintWriter out = null;
        try{
            out = new PrintWriter(new FileWriter(outFile, true));  // true for appending to the end of the file
            out.println(result);
        finally{  if (out != null){ try{ out.close(); } catch (Exception e){} }  }
    }

  • Photoshop CS6.1 Cannot save file as .tif-program insists on .pdf

    On Mac Pro using OS X attempt to save completed file as .tif.  Photoshop insists on saving it as a .pdf.  None of the format shown in "Format" field link up with actual extension.

    Hi. I have used the PS CS6 trial and an Epson v500 scanner to scan a 6 by 4 image at 6400 dpi using File => Import => From image device. The file was saved as a pdf and opened automatically in CS6. I was satisfied with the image and wanted to save it as a something other than a pdf since pdf is not really a widely accepted image format for archiving. The image size came out to ~ 6 GB. I went to Save As and the only options I see from the save as format drop down box were PSD, TIFF, and PS Raw. I tried Tiff, but it told me it cant save files past 4 GB. IM not interested in the other 2 formats it allowed me to save as. Any ideas? Why cant I save as a JPEG or BMP when something ahs been scanned as a PDF?
    As for plugins, I downloaded the official PS CS6 Mac plugins and placed them in the appropriate plugins folder.
    Are there file size limitations with respect to saving a copy when you have opened a file as a pdf?
    Its not that there is anything wrong with the pdf format, its just that I cannot use the scanner plugin for importing an image from PS6 to save as a Tiff or JPEG under 6400 dpi and 48 bpp settings (this problem was discussed ina nother thread).
    Any ideas?

  • I have used Image Capture to scan images/documents and then saved them as either PDFs or PNG files.  For some reason, just this past week Image Capture will no longer save the file.  It scans, and the Scan Results window pops up, but it won't save file.

    I have used Image Capture to scan images/documents and then saved them as either PDFs or PNG files.  For some reason, just this past week, Image Capture will no longer save the file.  It scans, and the Scan Results window pops up, but it won't save file.
    The file name has no special character in it, just letters and no spaces.
    I have done this in the past and it has worked, but now it will not.
    I have not upgraded any software, that I am aware of.
    After scanning, the Image Capture pops up the Scan Results with the file name in the window, but neither the Scan Results nor the Image Capture window responds to inputs.  The Image Capture window is frozen, with only the "Overview" and "Cancel" buttons active (but non-responsive).
    Is this a software issue or a scanner hardware issue?  I am using a HP Photosmart C6200 series printer/scanner on a network using a Time Capsule airport.
    Thanks.

    I had the same problem.
    Got a 90% fix.  Apparently the Mavericks preferences won't work with Yosemite, so I just deleted the Image Capture preferences.
    Unfortunately, the "Scan to" folder seems to be permanently set to the Pictures folder.
    1.  Quit Image Capture
    2.  Go to Finder > Go > Home, which opens up your home folder (named after your user name)
    3.  Open Library > Preferences > com.apple.ImageCapture.plist - Drag this file to the Trash
    4.  Start "Image Capture", click "Details" and change all your settings as you prefer
    5.  Quit and restart "Image Capture".   Notice it remembers all your settings except "Scan to" folder.  It insists on saving to "Pictures".
    That's as far as I was successful.  I tried changing the "Scan to" folder to "Desktop", but on launch, Image Capture always sets it back to "Pictures".
    This is what I tried:
    6.  Download and install "Pref Setter" from http://www.nightproductions.net/prefsetter.html
    7.  Quit "Image Capture".  Right-click on "com.apple.ImageCapture.plist" and open with Pref Setter.
    8.  Search for "Pictures", which finds "~/Pictures" (the tilde character at the start means your home directory).
    9.  Double-click on "~/Pictures" and change it to the folder you prefer.  I like "~/Desktop"
    10. Choose File > Save then Quit from Pref Setter.  Note that re-opening the plist file still shows "~/Desktop"
    11. Start up "Image Capture" -- on startup, "Image Capture" sets "Scan to" folder to "Pictures"
    I consider this a bug.

  • 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?

Maybe you are looking for