Deleting files off flash drive

Discussion in 'Mac Basics and Help' started by weekendsrule32, Dec 6, 2009.

  1. weekendsrule32 macrumors member

    Joined:
    Apr 8, 2009
    Location:
    New Jersey
    #1
    When i drag and drop files of flash drives into the trash, and then delete them, they are gone on the flash drive on a mac, but when i plug it into a pc ghost files show up. It is more annoying than a problem. Advice?
     
  2. ziggyonice macrumors 68020

    ziggyonice

    Joined:
    Mar 12, 2006
    Location:
    Rural America
    #2
    It's probably because of the resource forks.

    You see, there are some invisible files that the Mac uses for various things (preferences, icons, etc.) that aren't seen when you use the computer normally. However, Windows isn't smart enough to know what resource forks shouldn't be seen, and keeps them visible.

    If you really wanted to delete them, the easiest way is to simply not change any documents or name of the flash drive, etc. when using it on your Mac. Or just delete the files off the drive while on a PC. Or turn invisible files "on" and then delete them.

    Or just ignore 'em. :)
     
  3. weekendsrule32 thread starter macrumors member

    Joined:
    Apr 8, 2009
    Location:
    New Jersey
    #3
    So if I wanted to open a file and change it on a mac, I should move it off the drive and onto the mac, edit it, save the file on the mac, then transfer the file back to the drive?
     
  4. Gregg2 macrumors 603

    Joined:
    May 22, 2008
    Location:
    Milwaukee, WI
    #4
    If you want the edited version on the Mac, yes. If it's a minor change, you could just open it from the flash drive, edit and save it on the flash drive. It's just slower than your Mac. (just like the old days with floppy disks)
     
  5. Fishrrman macrumors G5

    Fishrrman

    Joined:
    Feb 20, 2009
    #5
    I didn't see this mentioned yet, but would using the option "Secure Empty Trash" make a difference?

    Not sure if this deletes the resource fork as well as the data fork.
     
  6. Primejimbo macrumors 68040

    Joined:
    Aug 10, 2008
    Location:
    Around
    #6
  7. Makosuke macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #7
    If it doesn't delete it with a normal empty trash, Secure Empty Trash won't be any different.

    That said, I'm a little surprised that the files are getting left--I would expect the Finder to properly delete the associated resource fork along with its "parent" file. Are you sure the files associated with the orphaned forks didn't get deleted some other way?

    For that matter, we haven't even confirmed if these ARE resource forks. What do the phantom file names look like? Are they in the format "._filename.extension", or do they look like something else?
     
  8. drtech macrumors newbie

    Joined:
    Dec 7, 2009
    #8
    I would be surprised if this has something to do with resource forks. OS X does not use resource forks (although it does support them for backward compatibility). Plus, resource forks are part of a "multi-fork" file. They wouldn't show up as separate files.

    This is probably a case of hidden files. In UNIX style operating systems (like OS X on your Mac), any file preceded by a "." is considered hidden and is not shown unless you give you Mac a specific command to show these files.

    However, Windows is not a UNIX style operating system, so, to Windows, these files are just files with a name that starts with a ".". The period has no significance to Windows.

    If this is the case, you can simply delete the file in Windows. BUT, you Mac does use many of these files for behind-the-scenes tasks. A perfect example is a file called ".DS_Store" in almost every folder. This saves information for Finder about that folder. If you delete this file in Windows then your Mac will go back to default settings for that folder; but guess what, next time you use the folder on your Mac, it will probably just recreate the file.

    (FWIW, Windows also uses hidden files that are invisible in Windows but show up on Mac, so it goes both directions.)

    Jeff
     
  9. samh macrumors 6502

    Joined:
    Oct 29, 2009
    #9
    It's got nothing to do with how "smart" Windows is. Windows doesn't use them so it handles them as regular files.
     
  10. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #10
    That is simply incorrect. Resource forks are still used in all versions of Mac OS X. A simple example is alias files created by Finder.

    They do when the file-system doesn't support multiple forks. Then the resource-fork and Finder metadata are stored in a "._"-prefaced file, adjacent to the associated data-fork file. This is called "AppleDouble":

    http://en.wikipedia.org/wiki/AppleSingle_and_AppleDouble_formats

    Note that a resource-fork isn't the only thing stored in this file. Files that have no resource-fork may have a "._" companion-file. For example, extended attributes are stored there on file-systems that don't have native xattr support.

    In general, Finder or any other app will delete, move, or rename any "._" companion-file correctly, because the file-system code rather than Finder itself is responsible for managing these companion-files.


    There's really no way to know whether the OP's phantom files are related to resource-forks, metadata, or whatever, until we know exactly what the filenames are.
     
  11. drtech macrumors newbie

    Joined:
    Dec 7, 2009
    #11
    You are correct. I should have said "rarely" used. Unlike OS 9 and previous, where resource forks were used extensively, Apple has tried to limit use of resource forks in OS X. I was attempting to simplify things a bit without diving into every possible case initially. Thank you for the correction.

    Again, I agree. I was attempting to find the most likely cause first, and being that .DS_Store files are found everywhere, I figured that was the first place to look. As fewer and fewer programs use resource forks, I determined this was a lesser possibility. It seems most times people see the .DS_Store file, blow it away, and then are surprised when it comes back.

    Thank you for adding the precision to the post.
     

Share This Page