Marking a file extension during saving???

Hi.
The problem is, when a file is going to be saved, how can I do such a improvisation like a "save as" dialog?
To avoid the "poor" technique of, user typing the extension, can do a something like a "save as" option in the JFileChooser saveDialog(), to offer a list of extensions and when user pick up one, to add it to the file name path, during file saving ?
Thanks!

Here is the solution I came up with. It will add the file extension if a FileExtensionFilter is selected, and you can set it to warn on write over
* Created on May 17, 2005 by @author Tom Jacobs
package tjacobs.ui.swing_ex;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.File;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileFilter;
import javax.swing.filechooser.FileSystemView;
import tjacobs.ui.FSFileView;
import tjacobs.ui.fc.FileExtensionFilter;
public class JFileChooser extends javax.swing.JFileChooser {
     private static final long serialVersionUID = 1L;
     private boolean mWarnOnWriteOver = false;
     private boolean mAncestorNull = false;
     public JFileChooser() {
          super();
          init();
     private void init() {
          setFileView(new FSFileView());
     public JFileChooser(String arg0) {
          super(arg0);
          init();
     public JFileChooser(File arg0) {
          super(arg0);
          init();
     public JFileChooser(FileSystemView arg0) {
          super(arg0);
          init();
     public JFileChooser(File arg0, FileSystemView arg1) {
          super(arg0, arg1);
          init();
     public JFileChooser(String arg0, FileSystemView arg1) {
          super(arg0, arg1);
          init();
     public boolean getWarnOnWriteOver() {
          return mWarnOnWriteOver;
     public void setWarnOnWriteOver(boolean b) {
          mWarnOnWriteOver = b;
          if (b) {
               addPropertyChangeListener(new PropertyChangeListener() {
                    public void propertyChange(PropertyChangeEvent pe) {
                         //System.out.println("Here");
                         //System.out.println(pe.getPropertyName() + ": " + pe.getNewValue());
                         if (pe.getPropertyName().equals("ancestor") && pe.getNewValue() == null) {
                              mAncestorNull = true;
                              return;
                         mAncestorNull = false;
     public File getSelectedFile() {
          File f = super.getSelectedFile();
          if (f == null) return f;
          if (getDialogType() == javax.swing.JFileChooser.SAVE_DIALOG && f.getName().indexOf(".") == -1) {
               //check if it's using file extension filter. If so, add the filter extension
               FileFilter ff = getFileFilter();
               if (ff instanceof FileExtensionFilter) {
                    String ending = ((FileExtensionFilter)ff).getType();
                    f = new File(f.getParent(), f.getName() + "." + ending);
          // now check if it's overwriting another file
          if (mWarnOnWriteOver && mAncestorNull) {
               if (f.exists()) {
                    int ans = JOptionPane.showConfirmDialog(null, "" + f.getName() + " exists. Overwrite?", "Save Over Existing File", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
                    if (ans == JOptionPane.OK_OPTION)
                         return f;
                    return null;
          return f;
}

Similar Messages

  • Rename file extension during a file upload ??

    I need to rename the extension of a file at some point during the file upload. I am not sure where to do this at.
    The file needs to be renamed before it is written to the directory.
    Basically, the file will come in with a .txt or .doc type. Based on a users profile, I will change the type to a non-relavent number such as 1111.
    Here is my upload servlet. Can you tell me where to change the type so it will write the file with the new extension?
    Thanks.
    public class FileExport {
    //restrict upload files to 1 Meg
    private static final int DEFAULT_MAX_POST_SIZE = 1024 * 1024;
    private static final String NO_FILE = "unknown";
    private HttpServletRequest req;
    private File dir;
    private int maxSize;
    private Hashtable parameters = new Hashtable(); // name - Vector of values
    private Hashtable files = new Hashtable(); // name - UploadedFile
    public FileExport(HttpServletRequest request,
    String saveDirectory) throws IOException {
    this(request, saveDirectory, DEFAULT_MAX_POST_SIZE);
    // request the servlet request
    // saveDirectory = directory in which to save any uploaded files
    // maxPostSize = maximum size of the POST content
    public FileExport(HttpServletRequest request,
    String saveDirectory,
    int maxPostSize) throws IOException {
    // check values
    if (request == null)
    throw new IllegalArgumentException("request cannot be null");
    if (saveDirectory == null)
    throw new IllegalArgumentException("saveDirectory cannot be null");
    if (maxPostSize <= 0) {
    throw new IllegalArgumentException("maxPostSize must be positive");
    // Save the request, dir, and max size
    req = request;
    dir = new File(saveDirectory);
    maxSize = maxPostSize;
    // Check saveDirectory is truly a directory
    if (!dir.isDirectory())
    throw new IllegalArgumentException("Not a directory: " + saveDirectory);
    // Check saveDirectory is writable
    if (!dir.canWrite())
    throw new IllegalArgumentException("Not writable: " + saveDirectory);
    // Now parse the request saving data to "parameters" and "files";
    // write the file contents to the saveDirectory
    readRequest();
    public FileExport(ServletRequest request,
    String saveDirectory) throws IOException {
    this((HttpServletRequest)request, saveDirectory);
    public FileExport(ServletRequest request,
    String saveDirectory,
    int maxPostSize) throws IOException {
    this((HttpServletRequest)request, saveDirectory, maxPostSize);
    // Returns the names of all the parameters as an Enumeration of
    // Strings. It returns an empty Enumeration if there are no parameters.
    public Enumeration getParameterNames() {
    return parameters.keys();
    // Returns the names of all the uploaded files as an Enumeration of
    // Strings. It returns an empty Enumeration if there are no uploaded
    // files. Each file name is the name specified by the form, not by
    // the user.
    public Enumeration getFileNames() {
    return files.keys();
    // Returns the value of the named parameter as a String, or null if
    // the parameter was not sent or was sent without a value.
    public String getParameter(String name) {
    try {
    Vector values = (Vector)parameters.get(name);
    if (values == null || values.size() == 0) {
    return null;
    String value = (String)values.elementAt(values.size() - 1);
    return value;
    catch (Exception e) {
    return null;
    // Returns the values of the named parameter as a String array, or null if
    // the parameter was not sent.
    public String[] getParameterValues(String name) {
    try {
    Vector values = (Vector)parameters.get(name);
    if (values == null || values.size() == 0) {
    return null;
    String[] valuesArray = new String[values.size()];
    values.copyInto(valuesArray);
    return valuesArray;
    catch (Exception e) {
    return null;
    // Returns the filesystem name of the specified file, or null if the
    // file was not included in the upload. A filesystem name is the name
    // specified by the user. It is also the name under which the file is
    // actually saved.
    public String getFilesystemName(String name) {
    try {
    UploadedFile file = (UploadedFile)files.get(name);
    return file.getFilesystemName(); // may be null
    catch (Exception e) {
    return null;
    // Returns the content type of the specified file (as supplied by the
    //client browser), or null if the file was not included in the upload.
    public String getContentType(String name) {
    try {
    UploadedFile file = (UploadedFile)files.get(name);
    return file.getContentType(); // may be null
    catch (Exception e) {
    return null;
    // Returns a File object for the specified file saved on the server's
    // filesystem, or null if the file was not included in the upload.
    public File getFile(String name) {
    try {
    UploadedFile file = (UploadedFile)files.get(name);
    return file.getFile(); // may be null
    catch (Exception e) {
    return null;
    // method that actually parses the request.
    protected void readRequest() throws IOException {
    // Check the content length to prevent denial of service attacks
    int length = req.getContentLength();
    if (length > maxSize) {
    throw new IOException("Posted content length of " + length +
    " exceeds limit of " + maxSize);
    // Check the content type to make sure it's "multipart/form-data"
    // Access header two ways to work around WebSphere oddities
    String type = null;
    String type1 = req.getHeader("Content-Type");
    String type2 = req.getContentType();
    // If one value is null, choose the other value
    if (type1 == null && type2 != null) {
    type = type2;
    else if (type2 == null && type1 != null) {
    type = type1;
    // If neither value is null, choose the longer value
    else if (type1 != null && type2 != null) {
    type = (type1.length() > type2.length() ? type1 : type2);
    if (type == null ||
    !type.toLowerCase().startsWith("multipart/form-data")) {
    throw new IOException("Posted content type isn't multipart/form-data");
    // Get the boundary string; it's included in the content type.
    // Should look something like "------------------------12012133613061"
    String boundary = extractBoundary(type);
    if (boundary == null) {
    throw new IOException("Separation boundary was not specified");
    // Construct the special input stream we'll read from
    MultipartInputStreamHandler in =
    new MultipartInputStreamHandler(req.getInputStream(), length);
    // Read the first line, should be the first boundary
    String line = in.readLine();
    if (line == null) {
    throw new IOException("Corrupt form data: premature ending");
    // Verify that the line is the boundary
    if (!line.startsWith(boundary)) {
    throw new IOException("Corrupt form data: no leading boundary");
    // Now that we're just beyond the first boundary, loop over each part
    boolean done = false;
    while (!done) {
    done = readNextPart(in, boundary);
    // A utility method that reads an individual part. Dispatches to
    // readParameter() and readAndSaveFile() to do the actual work. A
    // subclass can override this method for a better optimized or
    // differently behaved implementation.
    protected boolean readNextPart(MultipartInputStreamHandler in,
    String boundary) throws IOException {
    // Read the first line, should look like this:
    // content-disposition: form-data; name="field1"; filename="file1.txt"
    String line = in.readLine();
    if (line == null) {
    // No parts left, we're done
    return true;
    else if (line.length() == 0) {
    // IE4 on Mac sends an empty line at the end; treat that as the end.
    // Thanks to Daniel Lemire and Henri Tourigny for this fix.
    return true;
    // Parse the content-disposition line
    String[] dispInfo = extractDispositionInfo(line);
    String disposition = dispInfo[0];
    String name = dispInfo[1];
    String filename = dispInfo[2];
    // Now onto the next line. This will either be empty
    // or contain a Content-Type and then an empty line.
    line = in.readLine();
    if (line == null) {
    // No parts left, we're done
    return true;
    // Get the content type, or null if none specified
    String contentType = extractContentType(line);
    if (contentType != null) {
    // Eat the empty line
    line = in.readLine();
    if (line == null || line.length() > 0) {  // line should be empty
    throw new
    IOException("Malformed line after content type: " + line);
    else {
    // Assume a default content type
    contentType = "application/octet-stream";
    // Now, finally, we read the content (end after reading the boundary)
    if (filename == null) {
    // This is a parameter, add it to the vector of values
    String value = readParameter(in, boundary);
    if (value.equals("")) {
    value = null; // treat empty strings like nulls
    Vector existingValues = (Vector)parameters.get(name);
    if (existingValues == null) {
    existingValues = new Vector();
    parameters.put(name, existingValues);
    existingValues.addElement(value);
    else {
    // This is a file
    readAndSaveFile(in, boundary, filename, contentType);
    if (filename.equals(NO_FILE)) {
    files.put(name, new UploadedFile(null, null, null));
    else {
    files.put(name,
    new UploadedFile(dir.toString(), filename, contentType));
    return false; // there's more to read
    // A utility method that reads a single part of the multipart request
    // that represents a parameter. A subclass can override this method
    // for a better optimized or differently behaved implementation.
    protected String readParameter(MultipartInputStreamHandler in,
    String boundary) throws IOException {
    StringBuffer sbuf = new StringBuffer();
    String line;
    while ((line = in.readLine()) != null) {
    if (line.startsWith(boundary)) break;
    sbuf.append(line + "\r\n"); // add the \r\n in case there are many lines
    if (sbuf.length() == 0) {
    return null; // nothing read
    sbuf.setLength(sbuf.length() - 2); // cut off the last line's \r\n
    return sbuf.toString(); // no URL decoding needed
    // A utility method that reads a single part of the multipart request
    // that represents a file, and saves the file to the given directory.
    // A subclass can override this method for a better optimized or
    // differently behaved implementation.
    protected void readAndSaveFile(MultipartInputStreamHandler in,
    String boundary,
    String filename,
    String contentType) throws IOException {
    OutputStream out = null;
    // A filename of NO_FILE means no file was sent, so just read to the
    // next boundary and ignore the empty contents
    if (filename.equals(NO_FILE)) {
    out = new ByteArrayOutputStream(); // write to nowhere
    // A MacBinary file goes through a decoder
    else if (contentType.equals("application/x-macbinary")){
    File f = new File(dir + File.separator + filename);
    out = new MacBinaryDecoderOutputStream(
    new BufferedOutputStream(
    new FileOutputStream(f), 8 * 1024));
    // A real file's contents are written to disk
    else {
    File f = new File(dir + File.separator + filename);
    out = new BufferedOutputStream(new FileOutputStream(f), 8 * 1024);
    byte[] bbuf = new byte[100 * 1024]; // 100K
    int result;
    String line;
    // ServletInputStream.readLine()
    // adds a \r\n to the end of the last line.
    // Since we want a byte-for-byte transfer, we have to cut those chars.
    boolean rnflag = false;
    while ((result = in.readLine(bbuf, 0, bbuf.length)) != -1) {
    // Check for boundary
    if (result > 2 && bbuf[0] == '-' && bbuf[1] == '-') { // quick pre-check
    line = new String(bbuf, 0, result, "ISO-8859-1");
    if (line.startsWith(boundary)) break;
    // Are we supposed to write \r\n for the last iteration?
    if (rnflag) {
    out.write('\r'); out.write('\n');
    rnflag = false;
    // Write the buffer, postpone any ending \r\n
    if (result >= 2 &&
    bbuf[result - 2] == '\r' &&
    bbuf[result - 1] == '\n') {
    out.write(bbuf, 0, result - 2); // skip the last 2 chars
    rnflag = true; // make a note to write them on the next iteration
    else {
    out.write(bbuf, 0, result);
    out.flush();
    out.close();
    // Extracts and returns the boundary token from a line.
    private String extractBoundary(String line) {
    // Use lastIndexOf() because IE 4.01 on Win98 has been known to send the
    // "boundary=" string multiple times. Thanks to David Wall for this fix.
    int index = line.lastIndexOf("boundary=");
    if (index == -1) {
    return null;
    String boundary = line.substring(index + 9); // 9 for "boundary="
    // The real boundary is always preceeded by an extra "--"
    boundary = "--" + boundary;
    return boundary;
    // Extracts and returns disposition info from a line, as a String array
    // with elements: disposition, name, filename. Throws an IOException
    // if the line is malformatted.
    private String[] extractDispositionInfo(String line) throws IOException {
    // Return the line's data as an array: disposition, name, filename
    String[] retval = new String[3];
    // Convert the line to a lowercase string without the ending \r\n
    // Keep the original line for error messages and for variable names.
    String origline = line;
    line = origline.toLowerCase();
    // Get the content disposition, should be "form-data"
    int start = line.indexOf("content-disposition: ");
    int end = line.indexOf(";");
    if (start == -1 || end == -1) {
    throw new IOException("Content disposition corrupt: " + origline);
    String disposition = line.substring(start + 21, end);
    if (!disposition.equals("form-data")) {
    throw new IOException("Invalid content disposition: " + disposition);
    // Get the field name
    start = line.indexOf("name=\"", end); // start at last semicolon
    end = line.indexOf("\"", start + 7); // skip name=\"
    if (start == -1 || end == -1) {
    throw new IOException("Content disposition corrupt: " + origline);
    String name = origline.substring(start + 6, end);
    // Get the filename, if given
    String filename = null;
    start = line.indexOf("filename=\"", end + 2); // start after name
    end = line.indexOf("\"", start + 10); // skip filename=\"
    if (start != -1 && end != -1) {                // note the !=
    filename = origline.substring(start + 10, end);
    // The filename may contain a full path. Cut to just the filename.
    int slash =
    Math.max(filename.lastIndexOf('/'), filename.lastIndexOf('\\'));
    if (slash > -1) {
    filename = filename.substring(slash + 1); // past last slash
    if (filename.equals("")) filename = NO_FILE; // sanity check
    // Return a String array: disposition, name, filename
    retval[0] = disposition;
    retval[1] = name;
    retval[2] = filename;
    return retval;
    // Extracts and returns the content type from a line, or null if the
    // line was empty. Throws an IOException if the line is malformatted.
    private String extractContentType(String line) throws IOException {
    String contentType = null;
    // Convert the line to a lowercase string
    String origline = line;
    line = origline.toLowerCase();
    // Get the content type, if any
    if (line.startsWith("content-type")) {
    int start = line.indexOf(" ");
    if (start == -1) {
    throw new IOException("Content type corrupt: " + origline);
    contentType = line.substring(start + 1);
    else if (line.length() != 0) {  // no content type, so should be empty
    throw new IOException("Malformed line after disposition: " + origline);
    return contentType;
    // A class to hold information about an uploaded file.
    class UploadedFile {
    private String dir;
    private String filename;
    private String type;
    UploadedFile(String dir, String filename, String type) {
    this.dir = dir;
    this.filename = filename;
    this.type = type;
    public String getContentType() {
    return type;
    public String getFilesystemName() {
    return filename;
    public File getFile() {
    if (dir == null || filename == null) {
    return null;
    else {
    return new File(dir + File.separator + filename);
    // A class to aid in reading multipart/form-data from a ServletInputStream.
    // It keeps track of how many bytes have been read and detects when the
    // Content-Length limit has been reached.
    class MultipartInputStreamHandler {
    ServletInputStream in;
    int totalExpected;
    int totalRead = 0;
    byte[] buf = new byte[8 * 1024];
    public MultipartInputStreamHandler(ServletInputStream in,
    int totalExpected) {
    this.in = in;
    this.totalExpected = totalExpected;
    // Reads the next line of input. Returns null to indicate the end
    // of stream.
    public String readLine() throws IOException {
    StringBuffer sbuf = new StringBuffer();
    int result;
    String line;
    do {
    result = this.readLine(buf, 0, buf.length); // this.readLine() does +=
    if (result != -1) {
    sbuf.append(new String(buf, 0, result, "ISO-8859-1"));
    } while (result == buf.length); // loop only if the buffer was filled
    if (sbuf.length() == 0) {
    return null; // nothing read, must be at the end of stream
    sbuf.setLength(sbuf.length() - 2); // cut off the trailing \r\n
    return sbuf.toString();
    // A pass-through to ServletInputStream.readLine() that keeps track
    // of how many bytes have been read and stops reading when the
    // Content-Length limit has been reached.
    public int readLine(byte b[], int off, int len) throws IOException {
    if (totalRead >= totalExpected) {
    return -1;
    else {
    if (len > (totalExpected - totalRead)) {
    len = totalExpected - totalRead; // keep from reading off end
    int result = in.readLine(b, off, len);
    if (result > 0) {
    totalRead += result;
    return result;
    // Class to filters MacBinary files to normal files on the fly
    // Optimized for speed more than readability
    class MacBinaryDecoderOutputStream extends FilterOutputStream {
    int bytesFiltered = 0;
    int dataForkLength = 0;
    public MacBinaryDecoderOutputStream(OutputStream out) {
    super(out);
    public void write(int b) throws IOException {
    // Bytes 83 through 86 are a long representing the data fork length
    // Check <= 86 first to short circuit early in the common case
    if (bytesFiltered <= 86 && bytesFiltered >= 83) {
    int leftShift = (86 - bytesFiltered) * 8;
    dataForkLength = dataForkLength | (b & 0xff) << leftShift;
    // Bytes 128 up to (128 + dataForkLength - 1) are the data fork
    else if (bytesFiltered < (128 + dataForkLength) && bytesFiltered >= 128) {
    out.write(b);
    bytesFiltered++;
    public void write(byte b[]) throws IOException {
    write(b, 0, b.length);
    public void write(byte b[], int off, int len) throws IOException {
    // If the write is for content past the end of the data fork, ignore
    if (bytesFiltered >= (128 + dataForkLength)) {
    bytesFiltered += len;
    // If the write is entirely within the data fork, write it directly
    else if (bytesFiltered >= 128 &&
    (bytesFiltered + len) <= (128 + dataForkLength)) {
    out.write(b, off, len);
    bytesFiltered += len;
    // Otherwise, do the write a byte at a time to get the logic above
    else {
    for (int i = 0 ; i < len ; i++) {
    write(b[off + i]);

    I am also need to rename a file and extension while uploadinf the file to the server. The oreilly example seems only save as the same file name and ext. I wonder if you have the ability chANGE OIT OR NOT. pLEASE LET ME KNOW
    thanks
    kansen

  • Saving attachments on Snow leopard mail loses file extension when saving over an existing document

    Saving attachments on Snow leopard mail loses the file extension when clicking on an existing file to copy the name. Is there something I can switch on in the preferences to fix this?

    I work for a publishing company where our clients send their copy to us in Word documents. We might have several versions sent to us before the final version comes in.
    It is instances like this where we want to overwrite a document on the server with the most up-to-date version (which is usually named differently to the original file). We really don't want to clutter the folder with lots of different revisions. The quick way to do this is to click on the document we are replacing (this copies the document name). Previous versions of OSX Mail used to keep the file extension but Snow Leopard seems to remove it.
    It's annoying as there is no particular logic to this. We just have to manually type ".doc" at the end of the document.
    Incidentally, this happens with any attachment file type.

  • JFile Chooser - Add automatic file extension while Saving

    Hello,
    I have a JFileChooser, which I use for saving output from my program.
    Problem is whenever I save a new file I have to manually specify its extension, otherwise I get an undefined file with no extensions.
    I want my default extension to be ".txt".
    Any ideas on what method to use? Is this a trivial issue or a complicated one?
    Thank you,
    Berkan

    What about this? Not tested.
    import java.awt.Component;
    import java.io.File;
    import javax.swing.JFileChooser;
    public class FilenameGetter {
        private JFileChooser chooser = new JFileChooser();
        public File getFileToSaveTxt(Component parent) {
         if (JFileChooser.APPROVE_OPTION == chooser.showSaveDialog(parent)) {
             File chosenFile = chooser.getSelectedFile();
             if (chosenFile.getName().endsWith(".txt")) {
              return chosenFile;
             } else {
              return new File(chosenFile.getParentFile(), chosenFile
                   .getName()
                   + ".txt");
         } else {
             return null;
    }Piet

  • File extensions and other formats

    I'm having trouble with file extensions when saving AW files in other formats. I suspect it may have to to do with a recent upgrade to 10.5
    I have (as recommended in the forum) deleted the AW plist files, but it didn't help.
    Here are the symptoms:
    1. When saving, "Hide extensions" is always checked. I remember it as always being unchecked (which I prefer) . Unchecking it every time is getting annoying.
    2. If I uncheck Hide Extensions, I can save as an AW file with its cwk extension, no problem
    3. If I change the File Format to something else, like Text, then the Hide Extension box (which I had previously unchecked) is now checked again. The previous cwk extension disappears, but the period remains.
    4. If I then uncheck Hide Extensions, a second period appears.
    5. If I try to get rid of the extra periods and add txt so that the file is filename.txt, I get an error message that says I can't use the extension ".txt", and that the required extension is "." Using both leaves me with "filename.txt."
    6. The only solution has been to let it save with Hide Extension checked, then go into the finder, use Get Info to unhide the extension, and then save it with the correct extension, which is getting to be a real pain in the patoot.
    Help, anyone? I'm ready to downgrade back to 10.4.
    RJ

    Welcome to Apple Discussions
    Downgrading to 10.4 won't help much. The problem lies in AppleWorks being a Classic application that was carbonized to run in OS X. It just doesn't "understand" extensions. Although adding the period in Leopard is new, the problem with the error messages when you save an AppleWorks document as text or Word & add the appropriate extension is not new. I've given up & just add the correct extension in Finder.

  • How do i select the file extension type?

    using imovie '11.
    i've finalised a project and exported it. it automatically saved as a .m4v (itunes) file.
    my question is:
    is there any way to manually select the file extension when saving/finalising a project?
    for example, i might be required to save a project as a .mov file.
    thanks in advance.

    Publish the movie on itunes then, drag the movie on your desktop. After right click on the movie icon and click get info. Go to name and extension and change the .m4v to .mov . This should work because, it works if you want to change from .mp4 to .3gp etc... This saves you time because you don't have to use a movie converter.
    Best of luck Jono

  • Append file extension

    I want to shut off the automatic append file extension when saving a file in Illustrator CS3 to not have the .ai appear at the end of the file name. How do I do this?

    In a manufacturing company where naming conventions are in place, we don't want .ai placed into the file name on certain files. I am running a Mac and never had to have an extension in the filenames before cause Macs always hid the extension? I have the Finder preference to not show extensions but since Illustrator is placing it as part of the filename in the save dialog, it shows no matter what. What does adobe expect us to do, click on the file in the Finder and get infor, then click hide extension? We are making the conversion from Freehand to Illustrator (not by choice) and this is turning into a big nightmare on a lot of issues.
    Give me a lecture on the mapping issue. If I remove the .ai in the save dialog box before saving, I haven't seen any issues yet. My applescript studio applications don't save the .ai when they drive Illustrator. No issue there either. Tell me what you know about mapping issues.
    Don't want the app to automatically append file extension. Can it be done.... Yes or No?

  • Double file extensions keep showing up when saving a file in Illustrator CS3???

    I just installed the CS3 suite and when I am saving files in illustrator I keep getting double file extensions. For example if I save a file named "filename" as a .eps file it shows up in the save window with filename.eps.eps Also, if I click through the possible file types to save it keeps adding them one after the other so if I click. say pdf eps and ai the file in the "Save As:" window looks like this " filename.pdf.eps.ai.ai" Any ideas why this is happening? I keep having to mouse click in the "Save As:" box and delete the extra extension. This is really annoying!!
    I am running the design premium CS3 on OSX 10.5 on a mac pro.
    Thanks.

    >Wade... I've seen it... and reported it originally to Adobe. I've since realized it's a 10.5.1 issue. It doesn't happen with 10.4.11, just 10.5.1
    I've seen extra periods (.) and extra extensions.
    then you and Dave have the same conflict with a third party software, corrupt font, corrupt preference or the like because it is not happening o my Mac Pro and I have the same model Mac as you do and I am working fine in 10.5.1 and only problem I have had with AI CS 3 is when I tried to place a 3D CAD file with the extension .dxf which is not really supported.
    I have not seen this even once. Would you like to see screen shots, it honestly is not a 10.5.1 or Illustrator issue on its own. This has to be user specific.

  • Why do the file extensions (.jpg .gif .png) no longer appear when I click on a previously saved image to use that image's file name (particularly important when saving a series of images using the same root name)?

    I save a lot of images using firefox, often times from a large batch or series of images. It used to be that I would click on a previously saved image and the entire file name including the file extension (i.e. image_example.jpg) would appear in the "save as" line. Now when I click on a previously saved file, the file name appears without the file extension (i.e. image_example). Which means I have to manually type .jpg every time. For a large collection of images that I am hoping to use the same root file name and then add chronological numbers at the end, this has become incredibly frustrating, especially as it is a previously unnecessary task.
    I am using a new Macbook Pro and maybe there's something Apple related to this...? It did not happen on my old PowerBook G4. I have file extensions turned on in System Preferences.
    It should be noted that I have searched high and low and have even gone into the Apple Genius Bar where they were just confused as I was and of course ended by urging me to use Safari (shocker!) as it has all kinds of new extensions and bells and whistles. I seriously feel alone on an island with this dumb, hard to google problem. Thanks so much for any help anyone out there might have.
    I mean: is this as simple as changing a setting in about:config?
    Your assistance is greatly appreciated.

    Thanks for your response Mylenium, however like I mentioned multiple times, I did change all of my trackpad/scrolling settings in system preferences.  And if I wanted to use a normal mouse (or a tablet), I would've gotten an iMac instead of a MacBook Pro.  I travel often and work all over the place, not always with access to a decently sized workspace that would be required for using a mouse or tablet.

  • After the recent update on my Ipad Mini. It crashes frequently. The latest is that during saving, it crashed. Now I can't open my project file. It says, Not a valid Adobe Photoshop Touch file. What happened?!!

    After the recent update on my Ipad Mini. It crashes frequently. The latest is that during saving, it crashed. Now I can't open my project file. It says, Not a valid Adobe Photoshop Touch file. What happened?!!

    Sufficient free storage.... tried the reboot and install... Just received an iOS update I'll install tonight and do another reboot...see what happens. Going to have to start saving double..

  • When I try to open a saved image with the "htm" file extension all I get is a page of gibberish text.

    I have the new Snow Leopard system on my iMac. I saved several images from an art site. The file extension on each image is "htm". when I try to open each image all I get is gibberish tpye text.
    Can convert these "images" to jpeg files so I can view and edit them?
    thanks

    If the images have a .htm(l) file extension then you need to rename the files and give them an image file extension like .jpg<br />
    That should be sufficient to make programs recognize them as images.

  • ".saved" file extension

    Does anyone know how OSX can create a file with the ending ".saved"?
    Background:
    Somehow my inlaws deleted their Mail.app preference file (mail created a new one and became defaulted, losing their mail accounts) but the old one was still in the Library with an added extension: "com.apple.mail.plist.saved". I can't figure out what they did, nor how to recreate this event. Using Copy or Archive do not create this extension. I deleted the new preference file, removed the .saved extention from the old one, and the Mail was back to normal. All I know is it happened while working on a Pages document that they were intending to email.

    Thank you so much Andy. That really takes all the mystery out of it and now I know exactly what happened, as all the pieces and the things they said are now making sense.
    After Mail crashed and got defaulted it asked for the password for their defunct .Mac mail account (automatically imported from the .Mac prefs). They went to the Keychain to find the password and somehow ended up deleting the password to iChat (and .Mac) as well.
    I told them it's time to upgrade to Leopard so I can get TimeMachine up and running. I also may make them write their passwords in a .... BOOK .... and hide the Keychain app!
    Thanks BDAqua. The first thing I did was a permission repair and restart.

  • One of my imacs are saving all my files with a capitalized file extension?!

    one of my imacs are saving all my files with a capitalized file extension?! For example: .psd is .PSD this really suck because I keep getting to versions of all my files. Can someone please assist me in fixing this. Thanks! -derek

    Welcome to Apple Discussions!
    Did you format your hard disk on that Mac any differently?

  • Support for file extensions with more than three characters when saving - I want my FLAC!

    Why does the Wave Editor still drop characters from filenames with more than three character extensions when you save a file? But since -opening- a FLAC file with an extension of ".flac" doesn't get chopped to ".fla", why does Audition still chop off the extra character when -saving-?
    It gets old quickly when you have to save, close and reopen files in order to get Audition's Multitrack editor to play nice and be able to find files when you reopen the Session.
    Given that the FLAC filter is open source, I may just have to modify the code and recompile it to force a save to ".fla"... But of course, ".fla" is a Flash file extension, which I also use, so that is a crude hack for me.

    Hi bro...
    use in BYTE mode in place of in TEXT mode. and at the end of each line give some special charactor so as to distinguish between lines.This is effected  by unicode check too
    regards
    Edited by: Mohit Kumar on Feb 9, 2009 9:44 AM

  • I received an email containing a spreadsheet created using Mac Office 2004 on my new MacBook Air equipped with Mac Office 2011.  When I saved the document, my Finder lists the document without the .xls file extension. Why?

    I received an email containing a spreadsheet created using Mac Office 2004 on my new MacBook Air equipped with Mac Office 2011.  When I saved the document, my Finder lists the document without the .xls file extension. Why?
    All other .xls documents created by Mac Office 2004 retained the .xls file extention when I migrated them over to the new MacBook Air.

    I know what happened.  When I saved the document I somehow hit the Hide File Extension box.  Sorry to trouble this group. I simply resaved it w/o activating the Hide File Extension feature.

Maybe you are looking for