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


Click here to return to the '._ Filenames Droplet' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
._ Filenames Droplet
Authored by: Joshua on Feb 19, '02 06:57:39PM

I have the same problem with my new HipZip Mp3 Player.
So I have realized a little droplet with Applescript that delete all ._ files and then eject the disk.
Using this Droplet is very easy: you just have to drag the ._ "infected" disk on the Droplet.

Here is the code:

--Begin
on open cdisk
set disco to name of (info for cdisk)
try
do shell script "rm /Volumes/" & disco & "/._*"
end try
tell application "Finder" to eject cdisk
end open
--End

A ready-to-use Droplet is available here:

http://web.tiscalinet.it/thinkdifferent/HipDisk.sit



[ Reply to This | # ]
._ Filenames Droplet
Authored by: LaRoche02 on Apr 20, '02 07:57:35PM

Wow, I'm really glad I found this thread. I've been having problems using my mp3 jukebox with OSX for this reason. My problem is, the droplet doesn't seem to work. I think it is only deleting the res forks in the root directory, when I have a hiearchy of /artists/albums/files.mp3. How can I vary the script to look for res forks in all of the directories?

Thanks,
LaRoche



[ Reply to This | # ]
._ Filenames Droplet
Authored by: serversurfer on Apr 20, '02 11:54:12PM
Just change the 'do shell script' line to read
do shell script "rm -rf /Volumes/" & disco & "/._*"
This will cause the rm command to recurse through directories looking for files that start with '._' The -r flag means recurse and the -f (force) flag means remove the file even if they are not 'writable' and ignore non-existent files. (Obviously, non-existent files aren't a issue ion this case, but we want to kill all the ._'s even if they aren't writable.)

Love,
The Surfer

[ Reply to This | # ]
._ Filenames Droplet
Authored by: fracai on Jun 23, '05 03:34:07PM

-r doesn't really mean search recursively. what it does mean is if a folder matches then that folder and it's contents should be removed

in order to actually recurse you'd want to use something like:

find ./ -iname "._*" -exec rm -rf -- {} \;

this will find anything that starts with ._ and remove it, folders and files.

---
i am jack's amusing sig file



[ Reply to This | # ]