Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Automatically delete Mac OS X dot files from MS-DOS filesystems' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Automatically delete Mac OS X dot files from MS-DOS filesystems
Authored by: joeyblades on Feb 07, '11 10:36:17AM

Three things:

  1. Apple recommends that you do a dot_clean before the find-and-rm operation.
  2. Sometimes you need to remove the dot files while the drive is still mounted. This is because when you're dumping visible files in the trash, the leftover dot files can take up a lot of room... preventing you from moving over new files.
  3. I'm (personally) a little nervous about the way you've automated this... for multiple reasons.

TIMTOWTDI - I chose a slightly different approach... I've been thinking about posting it, but it's a little more complicated. I have a bash script that is called by an AppleScript that is called by pushing a button on a Finder toolbar. I just push the button right before I unmount... One could choose to integrate the unmount into the button as well, but, as I mentioned, sometimes I want to clean the dot files and stay mounted.

Also, I have a failsafe mechanism that will prevent the dot file removal from executing on an unintended volume. So I can allow the removal of dot files from the multiple flash drives that I shuttle around between devices and I can NOT inadvertently remove the dot files from the large-ish (MS_DOS formatted) portable drive that contains my music that I shuttle between my Mac and my PC (for which I want the dot files preserved).

If there is sufficient interests, I can share the details of my alternative solution.



[ Reply to This | # ]
Automatically delete Mac OS X dot files from MS-DOS filesystems
Authored by: lsloan on Feb 07, '11 11:45:14AM

I'd love to see your solution.

I actually thought of doing something like that, with an AppleScript that I run before ejecting, but I wanted it to be a little more automatic. Mostly because I was going to give this to some people who are not as technical and I wanted it to be easy for them. I can see how that kind of solution would help in the situation you mentioned in #2, though.

I'll look up dot_clean to see what that is. I did a lot of Google searches and I didn't see mention of that until now.

---
Lance E Sloan



[ Reply to This | # ]
Automatically delete Mac OS X dot files from MS-DOS filesystems
Authored by: joeyblades on Feb 08, '11 12:23:35PM

I threw together a web page detailing my solution. You can find it here. Let me know what you think and if you have any suggestions.

Some of those droplets might be an even easier solution... but I like to have access to the guts... better the devil I know...



[ Reply to This | # ]
Automatically delete Mac OS X dot files from MS-DOS filesystems
Authored by: lsloan on Feb 08, '11 12:29:05PM

Great! I'll give it a look.

Meanwhile, I'm making changes to my script to make it better and safer. So far, I've added a Finder dialog box that pops up and asks the user whether they would like to clean the MS-DOS filesystem before ejecting it. (The default answer is "No".) I'm also changing the find command to be more efficient and to delete only known Mac OS X problem dotfiles, like .DS_Store, .Trash, etc.

---
Lance E Sloan



[ Reply to This | # ]
Automatically delete Mac OS X dot files from MS-DOS filesystems
Authored by: joeyblades on Feb 08, '11 04:39:54PM

Actually, the ones that give me the most trouble are the "._name" files that often show up with mp3s. I have two players that will try to read these files adding unpleasant delays and generating some random noise.

If you don't shuttle a lot of mp3s around you probably never noticed one.



[ Reply to This | # ]
Automatically delete Mac OS X dot files from MS-DOS filesystems
Authored by: lsloan on Feb 09, '11 06:40:47AM

Yes, I've seen the "._" files. They show up with MP3s, JPGs, and movies, depending on which software one uses. I often see "._.Trash" along with ".Trash", too. I forgot to mention that I've also added a call to dot_clean to my script to clean them up.

I wish it were easy for hint authors to update their hints here. Maybe when I consider my solution to be as "perfect" as it can be, I'll ask crarko to update this hint.

---
Lance E Sloan



[ Reply to This | # ]
Automatically delete Mac OS X dot files from MS-DOS filesystems
Authored by: afingal on Feb 07, '11 12:27:06PM

I wonder if it would make sense to use an AppleScript folder action or Automator workflow attached to the USB stick that would delete the dot files. That way you could have them deleted whenever the folder/volume is modified.



[ Reply to This | # ]
Automatically delete Mac OS X dot files from MS-DOS filesystems
Authored by: lsloan on Feb 08, '11 08:38:30AM

That was my very first thought. I tried, but I couldn't find a way to run an AppleScript just before the volume is ejected.

---
Lance E Sloan



[ Reply to This | # ]