Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Whenever I plug someone's FAT32 flash drive into my computer, MacOS loves to add all sorts of hidden files.

A couple of these include:
.Spotlight-V100/
.Trashes/
.fseventsd/
.DS_Store

When they get the drive back, they see all this cruft. How can I prevent this from happening?

Thanks!

share|improve this question

5 Answers 5

These files and directories are created by various applications:

.DS_Store - Created by Finder when you open a directory. It stores information about the folder (view options, icon positions, etc).

.fseventsd - created by the fseventsd daemon. It contains data about file system events such as modifications, deletion, creation, etc.

.Spotlight-V100 - stores indexing information for spotlight in the form of metadata.

.Trashes - A folder containing files that have been sent to trash but not yet deleted from the volume.

In order to prevent them all from being created, you have to modify the behaviour of each application individually. That would include adding an exception to Spotlight, Disabling Finder's caching feature (if possible), changing the fseventsd daemon and so on. I'm not sure if it's even possible to add exclusions or disable all of these features. If you don't need to write to the disk, I'd just mount it as read only to make things easier.

share|improve this answer
    
Is there anything you don't know?! I need read/write access to the drive but I'm guessing MacOS doesn't have ability to add simple exceptions. Sounds like I might need an app for this-- if it's out there... ps. thanks (yet again) for the help. –  macek Feb 5 '10 at 16:48
    
Maybe it would be easier to mount as read only then copy the entire drive to your disk for modifications? I'm not sure exactly what you're doing but it might be a suitable solution. Regardless, you're more than welcome :) –  John T Feb 5 '10 at 16:51
    
This answer provides details as to how it might be possible to fix the problem, but I'm not going to mark this as accepted because it does not actually provide a solution. Still an up-vote, though! Thanks for the info, John :) –  macek Feb 9 '10 at 19:23

Leopard & Snow Leopard make these files hidden. Mac OS X can be told not to put these files on network drives using:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true
share|improve this answer
    
Are USB drives considered "network drives"? –  macek Feb 5 '10 at 16:51
    
I think this only prevents .DS_Store creation, but this is the right way to add an exception for that. –  John T Feb 5 '10 at 16:52
    
I tried doing this and it only prevents .DS_Store –  macek Feb 5 '10 at 18:22
    
This doesn't seem to apply to normal USB drives at least on Lion. –  ؘؘؘ Feb 13 '12 at 10:15
up vote 2 down vote accepted

I don't know if saying "here's an app" is an OK solution to a problem, but I did some digging and found this:
http://www.zeroonetwenty.com/blueharvest/

Might be worth taking a look at but might not be worth $16.95...

EDIT:

I'm using BlueHarvest trial and seems to work very well. Because it provides the most complete solution for the original question, I'm marking this as the accepted answer.

share|improve this answer

There are two approaches.

One works on one machine for all flash drives, and stops the various services from writing to the drive. It's fairly complex, so I'll let thexlab explain it themselves at http://www.thexlab.com/faqs/stopspotlightindex.html

The other fixes one flash drive so you can poke into Macs and not have them index it. You have to put a few files on the flash drive BEFORE you plug it into a Mac, that tell the OS not to write various things. More info at http://hostilefork.com/2009/12/02/trashes-fseventsd-and-spotlight-v100/

between the two of them, they seem to have it covered. No, it's not perfect - if you carry a stick around and stick it into Macs, it HAS to have at least those few useless files on it. Oh, well.

share|improve this answer

Well, there's also this and it's free, u might want to throw a folder called autorun.inf too for security in windows

http://hostilefork.com/2009/12/02/trashes-fseventsd-and-spotlight-v100/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.