Benches macOS

7

Mac files without extension

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

Hi Everyone,

In our company environment, each user has a home drive (resides on SAN share) and they place a copy of their files on their home drive instead of local machine so that their files can be backed-up on routine bases.

Now we have start encountering a problem, whenever a Mac user will copy a file (any files that does not have extension) on his home drive and then try to download back to his desktop then Mac machine will not recognize that file. This will only happen with those files does not have an extension. We are running Leopard and Tiger OS X on Macs

Does anyone know how can I fix this issue?

Thanks,

7 replies

Sign in or join Beachball Help to reply.

  1. 0

    AK_Mike

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    the best way to "fix" the issue would be for the users to accept responsibility for file naming.

    We are cross platform so it is essential that all documents have the correct three or four letter extension. When setting up the initial user profile, we make sure that both Mac OS and Win XP are set to show extensions.

    After that it is up to the users. Beatings will continue until morale improves. 😉

  2. 0

    J D McIninch

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    How is this home drive shared?

    OS X can use file extensions or meta-data about the file in order to determine the file type and how to open it. If stored to a native OS X HFS+ filesystem, then the meta-data is stored within the filesystem itself. On network shares that are AFP volumes, the meta-data is sent along with the file information and the host environment figures out how to store it -- most importantly is that OS X basically sees the file and meta-data just like a native volume.

    If you use a non-OS X protocol like SMB/CIFS or NFS, OS X will write the file data and the meta-data separately. The meta-data is stored in a file with the prefix '._'. So, say you have a file named 'My Document', there would be in the same directory a file called '._My Document' created that has all the meta-data. When a Mac accesses a non-native filesystem, the operating system knows to use the dot-underscore files and it does the correct thing when copying files back and forth (merging the meta-data back into the native filesystem, for example).

    In your scenario, it sounds as if the meta-data is being lost. This could happen if the meta-data files were deleted for some reason, or the file server prohibited access to files starting with '.', or any of a slew of other reasons. You might consider using the Terminal to check if the meta-data files exist and are accessible.

  3. 0

    Dave Calderbank

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    OS X doesn't store extensions anywhere, it just hides them. In Classic, creator and filetype were stored inside the file, now it's just the creator. That's why files created in Photoshop will open in Photoshop and not Preview for example.

    To see all extensions all the time go to Finder -> Preferences -> Advanced, check "show all file extensions".

  4. 0

    J D McIninch

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    The file extension is part of the file name, and it
    may be hidden by the Finder. The "Advanced" tab in the Finder preferences permits you to force the file extension part of the file name to be displayed. Otherwise the default is to hide the extension part of the file name
    unless you've explicitly asked Finder to display the extension for that particular file (select file, press command-I, and uncheck "Hide extension").

    OS X still stores a "Creator Code" and file type for each file in the system metadata (as described in my previous post). You can see these using Terminal, and the command 'mdls'. OS X 10.6 uses this information differently than previous versions. OS X 10.6 maintains the creator code, but now ignores it in deciding which application to use to open a file.

    The Finder (and the shell's "open" command) use the following criteria to decide what application to open a document with (stopping at the first one that fits):

    1. Did the user specify the application using the Finder? If so, use that.

    2. If the file has an extension in the name ('.' followed by a string that doesn't contain a '.'), and that extension is registered with LaunchServices, use the file type and default application registered with LaunchServices.

    3. If the file meta-data contains a 4-letter file type (kMDItemFSTypeCode) and that's registered with LaunchServices, use the default application that's registered.

    If the file type is selected by 2 or 3
    and there are multiple applications that can work with those file types and the user hasn't specified a default, then check if the file has a creator code and use that as the default application (note that 10.6 no longer considers the creator code). If there's no creator match, give preference to OS X apps over Classic ones (10.6 no longer supports Classic apps). Give preference to apps on the boot volume over other volumes, and if there's two apps with different versions, give preference to the most recent.

    That said, your problem is specific to files that have no extension (so they aren't subject to the assignment of file type by extension). If OS X can't determine what type of file they are without the extension, then the meta-data that contains the file type and creator have been lost (you're posting to the Leopard discussion group, so the creator code is still relevant). This indicates that the meta-data has been lost or stripped in the process of being transferred to the network drive as I had described above.

    Note that you can programmatically restore the information, but the user can also manually assign the application used to open a file using the Finder.

    Were it me, I'd probably work on trying to figure out why the metadata is being lost and correct that first. You can remediate the problem with some Perl scripting, the 'file' command (which is a UNIX utility that determine's a file's type information by looking at the content of the file), and the SetFile utility (to manually set the creator and file type metadata).

    It should also be noted that if you've lost the file meta-data, you've lost the file resource fork -- if it had one. Using the resource fork for files is deprecated and hasn't been common since before the move to OS X, but it's still possible that you are using some older Classic apps that utilize that. If that's the case, you've lost that information.

  5. 0

    rsharma55

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Mac user will connect to home drive using SMB protocol. After finding little more details about this issue, I am not sure if this is file corruption problem.

    Because when the user goes to one of the machine (Tiger OS X) and logs in and see the files in his home drive then files seem to be corrupted but when same user tries on other machine (Tiger OS X), then same files show up okay.

    Both machines are running different version of Tiger OS X.

    Also I have tried two other machines using Leopard OS X and they are showing corrupt file on user's home drive.

    I have asked user to delete the old files and then copy new ones, after copying new ones to the home drive, files seem to be okay until user logs out of the system but once user logs in then files seem to be corrupt again.

    As you have mentioned that there should be another meta file (._filename) but I don't see any meta file at all.

    So that is why I am assuming that files are not corrupt, it is the OS which can' t seem to read them properly.

    Thanks,

  6. 0

    Sean Dale1

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    This is an old thread but you may find it useful.

    If you do find you need to add extensions to all the files then you could use
    this to help speed up the process

  7. 0

    BentleyBoy

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I am experiencing a similar problem with Snow Leopard users accessing a Tiger server. The SL user accidentally?, automatically?, not sure how but changed a lot of files into unix executables with no file extension. (And no I don't mean hidden. I try to stay out of using sudo when I can, but there is no extension under get info, they are not hidden either. When I put on display all extensions under finder prefs it still shows nothing.) This problem has affected files with different extensions (before becoming a unix exec.) including applications which makes fixing the problem even more of a pain because I can't just tell it to open all file types with the same program. I'm OK with fixing what these files use to open, but it would be really nice if I could get to the root of the problem as to prevent this in the future.

    This seems like a compatibility issue between leopard and tiger but I don't know for sure it wasn't bug, etc.