Why Do Macs Leave Garbage Files Like “ds_store” On My Flash Drive, And How Do I Stop It?

Ads by Google

mac crap 300   Why Do Macs Leave Garbage Files Like ds store On My Flash Drive, And How Do I Stop It?“What’s all this crap?” she complains. You’ve just handed back her USB drive, now plugged into her PC.

What?” you ask.

“On my flash drive,” she says. “There are all of these…stupid files.”

Are you sick of explaining why your Mac – despite being superior in every way to her PC – feels the need to leave behind a bunch of files on her USB key? Or network drive, for that matter? Stop it from happening.

Indexing, trash bins, folder positions – OS X keeps track of all these things, on every drive connected to your Mac, by creating files. These files are fine on a Mac – OS X uses them regularly, and hides them from the user. Plug a drive mainly used with Windows into a Mac, however, and in Windows you’ll see a variety of useless files cluttering things up. Do you want to stop the madness? You can.

The Problem

Feel unclear what the problem is? Insert any flash drive readable by Windows – FAT, in all likelihood – into your Mac. Eject it, then insert it into a Windows computer. You’ll be greeted by this nonsense:

mac crap   Why Do Macs Leave Garbage Files Like ds store On My Flash Drive, And How Do I Stop It?

Ads by Google

What’s all that crap? Well, the Spotlight and Trash folders should be obvious – they’re related to indexing and deleted files, respectively. The folder “.fsevents” records file system events. It’s a record of everything that happens on the drive. And the infamous “DS_store” file – not pictured above – records things like the placement of icons in Finder.

This is all useful to Macs, but in Windows it’s just annoying. Why does OS X write such files to drives formatted FAT, knowing Windows users will see it as nonsense? Good question.

Your Mac creates these files basically the second you plug in a drive, so there are two things you can do – delete the files before you eject the drive or stop the Mac from creating the files. I’m going to outline some apps, starting with two that take the first approach before moving on to two that take the second.

Automatically Delete the Files Before You Eject

If you think you can remember to use them, two different application can delete all of these files when you eject. Simply add the app icon to your dock and you’re ready to use it.

The first such app is Eject For Windows, which despite its name is actually a Mac program. Drag any drive you want to eject here and all of the crap files will be deleted:

mac crap eject for windows   Why Do Macs Leave Garbage Files Like ds store On My Flash Drive, And How Do I Stop It?

Another app, called HiddenCleaner, works the same way:

mac crap hidden cleaner   Why Do Macs Leave Garbage Files Like ds store On My Flash Drive, And How Do I Stop It?

I tested both of these apps using Mountain Lion and Windows 7 – the Mac left no ugly files that the PC could see. Because both apps work the same way, you can pretty much choose based entirely on which icon you like best. I’ve got to say, Hidden Cleaner wins for me on that front (it’s up to you, though).

Stop The Files From Being Created

Want to stop these nonsense files from even appearing on non-Mac drives? Install BlueHarvest. This app installs as a preference pane, allowing you to configure when such files are created:

mac crap blueharvest   Why Do Macs Leave Garbage Files Like ds store On My Flash Drive, And How Do I Stop It?

There’s a 30-day trial, but if you want to keep this app around you’re going to need to pony up $15. If crap files on Windows drives is something you really, really care about, check out BlueHarvest.

Mostly concerned about .DS_Store files on network drives? TinkerTool, a free configuration tool, can handle that. The first screen of this app allows you to stop your Mac from leaving crap files on network drives:

mac crap tinkertool   Why Do Macs Leave Garbage Files Like ds store On My Flash Drive, And How Do I Stop It?

Check that box and your Mac will stop creating such files. This program does a lot more, so read more about Tinkertool. It’s not as complete as BlueHarvest – no support for USB drives – but combined with a tool like Hidden Cleaner you’ll be completely set.

Cross-Platform

Getting a file from a PC to a Mac used to be a big deal – file incompatibilities were a fact of life. These days the two platforms play more-or-less nicely with each other – yet annoyances like this persist. I think OS X should be smart enough to tell when a drive is meant to be shared with Windows computers and adjust accordingly, but I want to know what you think.

Is this not nearly as big a deal as I’m making it out to be? Or do you also think something at the system level should be done to fix this? Let us know in the comments below, along with links to any other tools for solving the problem.

Ads by Google

20 Comments - Write a Comment

Reply

Doc

“Insert any flash drive readable by Windows – FAT, in all likelihood”

FAT32, in all likelihood; FAT12 is only used on floppy drives, and FAT16 can only be used for partitions of 2GB or less. Microsoft released ExFAT for drives larger than 32GB (Windows XP and up will refuse to format a partition of larger than 32GB as FAT32, which is stupid; tools like Partition Magic, etc. will do so with no problems, however.)

justinpot

You’re absolutely correct, I just wanted to be less specific. Many people use ExFAT now.

Doc

Who uses ExFat? Even the 32GB thumbdrive I bought a year ago was formatted FAT32; the new 8GB I bought two weeks ago was formatted FAT32 (I know this because I still have an XP machine that doesn’t have ExFAT support installed, and both drives are recognized).

Justin Pot

ExFat is increasingly used by Mac users, because it offers cross-platform compatibility without some of the limitations of FAT32. But you’re right: most devices come with FAT32.

Doc

What “limitations”? IIRC, the only limitations on FAT32 that mean anything are a file size limit of 4GB, and the fact that Microsoft’s patent on FAT32 has expired (the real reason they created ExFAT).

Justin Pot

The 4GB thing is a huge deal if you’re working with media, which is true of many Mac users.

Also, from my understanding, ExFat doesn’t have the filename restrictions FAT32 does, which can be important for some projects. InDesign users, for example, depend on linked images – and will curse a lot if filenames shorten There’s also a difference in terms of how large a partition you can create, though the current limit (8 TB) isn’t going to affect many people.

But I’m willing to admit if I’m wrong about anything, I’ve just noticed in my IT work and reading around the web that ExFat is becoming common among those who need to move files from Windows to Mac and back. Shame about Linux compatibility, though…

Reply

Chris

What I learned from this is that my long, hard, thick Mac is superior to my stupid girlfriend’s PC in every way!

Reply

Jerry

Thanks- I’ve looked into this before, and neither of the free flashdrive utilities sounds familiar: Are there any other Free alternatives? I seem to remember one that Prevents this trash, and is Free ~

justinpot

If it exists I haven’t found it. And I looked quite a while, but as always: I’d be thrilled to be wrong.

Reply

Jerry

After looking at their websites, and some Mac forum threads, I will pass on HiddenCleaner.

Reply

Donovan

Is there a way to make it so it doesn’t pack the extra junk files in the zips it makes?

justinpot

Use a different program to make the zips, I think.

Reply

Taurac

Stopped reading at, “despite being superior in every way to her PC”.

justinpot

It was meant as a joke about Mac users, but enough Mac users actually think that way that I can see why you took it seriously.

Reply

Bruno Casarini

There’s also the beautiful CleanMyDrive to do this kind of job: http://macpaw.com/cleanmydrive

macwitty

Sorry Bruno, didn’t see you post before I posted mine with the same content

justinpot

This is excellent. I love it when you guys find stuff I didn’t.

Reply

macwitty

For me it is not as big a deal as it is made here. Saying that I do want something at the system level to fix it.

I have not used it, but do not Cleam ny Drive – free in Appstore do the jobb? http://macpaw.com/cleanmydrive and https://itunes.apple.com/us/app/cleanmydrive-clean-eject-external/id523620159?ls=1&mt=12

Reply

Happy PC user

“… your Mac – despite being superior in every way to her PC …”

ROTFL, some kind of ego issues? Oh wait… why it’s always a Mac user who tries to convince everybody around that the Mac doesn’t suck (that bad)? But the numbers don’t lie, the so called “superior” Mac is faaaaaaaaar behind Windows userbase. Simple as that.

Justin P

I’m glad you laughed, because that was meant to be a joke.

Your comment