Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Mhaddy

macrumors 6502
Original poster
Oct 26, 2005
445
1
Canada
I frequently mirror my Leopard documents to a Win XP laptop for redundancy but when copying from Leopard to XP, I end up with the hidden resource fork files ("._") which end up cluttering my XP directories. How can I get rid of these files when copying to XP?
 
One way to do this is the following:

1. Make a copy of the directory to somewhere on your Mac.
2. Go to the terminal and 'cd' into the new directory.
3. Type:

find . -name ._* | xargs -J {} rm {}

What this command does is the following. It uses the command 'find' for the current directory '.' and looks for files with the name that starts with '._' and ends with anything (*). It pipes this output (|) into 'xargs', which then takes each file it finds and runs the 'rm' command on it -- and deletes it. This command works recursively.

Warning: you had better run 'man' on 'find', 'xargs' and 'rm' before using this command, if you are unsure about it (and you oughta be).

At this point I'd zip or tar/gzip the directory and its contents and then transfer it to another platform.
 
Thanks for help, darwinian. While that works for odd jobs, it isn't really practical for me as a regular/daily/multi-daily sync. Is there a way to create a "droplet" (I believe that's the correct term) that I can place in the dock, and then whenever I want to sync between OS X and XP, I just drag the folder/files onto the droplet, and that automatically copies the files to a temp dir, removes the ._ files, copies these files to a USB key, then deletes the temp dir.

I'm thinking AppleScript can do something like this?
 
i have used findercleaner to do this on USB drives for a while now, but i have read that this App is malware as it sends information over the internet every time you use it. Can anyone confirm or deny this?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.