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

Click here to return to the 'poopless apple script dropplet perl version' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
poopless apple script dropplet perl version
Authored by: SOX on Sep 17, '04 06:37:40PM
here is an applescript droplet. This dropplet takes an exported song list file and replaces it with a new file that contains only the duplicate names. the original file is not deleted but rather renamed with a ".orig" suffix.

-- This droplet finds duplicates of songs from an exported song list file.
-- Author: Charlie Strauss 2004
on open this_item
        set target_name to this_item as string
        set posix_target to quoted form of the POSIX path of target_name
       set command to 
          "perl -i.orig -0x00d -nwaF\"\\t\" -e '$x = join \" ::\\t\",@F[0..3]; print $x,\"\\n\" if $h{$x}++ '  "
                do shell script command & posix_target
        on error error_message
                display dialog "Whoa! " & error_message buttons 
                        {"Rats"} default button 1
        end try
end open

[ Reply to This | # ]