Remove resource forks ("._" files) when copying to XP?

Discussion in 'Mac Basics and Help' started by Mhaddy, Jan 27, 2008.

  1. Mhaddy macrumors 6502

    Mhaddy

    Joined:
    Oct 26, 2005
    Location:
    Canada
    #1
    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?
     
  2. darwinian macrumors 6502a

    darwinian

    Joined:
    Jan 4, 2008
    Location:
    In R4, more or less
    #2
    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.
     
  3. Mhaddy thread starter macrumors 6502

    Mhaddy

    Joined:
    Oct 26, 2005
    Location:
    Canada
    #3
    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?
     
  4. afd macrumors 6502a

    Joined:
    Apr 12, 2005
    Location:
    Scotland
    #4
    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?
     
  5. trainguy77 macrumors 68040

    Joined:
    Nov 13, 2003
  6. afd macrumors 6502a

    Joined:
    Apr 12, 2005
    Location:
    Scotland
    #6
    thanks, will give that a try, looks like it is what I have been looking for.
     

Share This Page