Add to iTunes, delete from Downloads, add Comment to ID3?

I sorry Dozens, -I have fixed it and put it in the post above.
I am also sorry that I haven’t taken the time for testing that folder action of yours, though it should end up to be highly usable. -And not only for mp3. I don’t know where to get mp3’s for download, -that’s the reason. :slight_smile:
I think we are getting close to a final edition.

Just wondering if the deletion works now, if you give it “a load” of mp3 files.

YES, YES, YES, YES!!! I think that’s got it! Allow me to possibly ask for two other things.

  1. That this also work for .m4a files. (If not, it’s not a big deal, I can just duplicate the script, edit .mp3 to .m4a and attach it as a second folder action.)

  2. When adding the the tag to the Grouping field, this ADDS ‘singles’ to what is already there (example: “Rolling Stones” becomes “Rolling Stonessingles”). Is there a way to make it REPLACE whatever text is in the Grouping field with the ‘singles’ text?

(Also, if you enjoy doing this scripting, I have a great challenge for you after we complete this if you’re up for it! It’s similar but more involved.)

Hello.

I take it that it deleted ALL the mp3 files correctly. And you promise to tell me when it eventually didn’t, thats very interesting for me to know. :slight_smile:

Edit: I have done the grouping and added m4a.

Re.Next idea. Come on and lets have a look at it.

Yes, it works perfectly as far as deleting ALL the original files, I’ll be trying it again in a few minutes and I promise you I will come back here and let you know of any errors I receive.

Did you edit the way it handles the tagging of the Grouping field?

I personally think this could be a very powerful and useful script for many people, and think you are doing a GREAT service in writing it! Thank you! :slight_smile:

In regards to the more complicated script, check out my thread here: http://macscripter.net/viewtopic.php?pid=130173 It’s essentially the same script, but with some added steps for dealing with opening .zip or .rar archives of .mp3 or .m4a files, plus some optional but much wanted add-ons.

Problem: when I have my laptop muted and it adds an mp3 to the library it un-mutes my mac.

Sorry, didn’t see that one coming, first thing in the morning.

Couldn’t sleep, its done.

Haha, you’re a machine!

All the more reason I hate to tell you that all appears good, but we still have the deletion problem. I just dropped 16 mp3s into the Downloads folder and while it added all 16 to iTunes, I received a series of six errors stating:

“iTunes got an error: File permission error. : -54”

Subsequently, six mp3s were not deleted and those same tracks are the only ones that didn’t not receive the ‘single’ Grouping tag.

Hello. do not delete those files please, Or if you already have, please download them again, so that we can run a script to see what kind of properties those files have, to avoid such problems in the future.

I’ll be back with that script sometime within 24 hours.

Please run this script and choose one or several files that have shown problems.
then paste the report from TextEdit here, so I can see what is wrong.
So we have something more to work on. -Ill probably add some functionality one way or the other.

Be prepared: this script may not work after all. if that is so, then copy and paste the snippet below into a terminal window. Copy the output out of the terminal window and paste it here.

cd ~/Downloads ls -l *.mp3 ls -l *.m4a


-- INFO FOR SELECTED ITEMS
-- ©1998 Sal Soghoian, Apple Computer
(*
    Tinkered By McUsr 2010-04-02 :
    Changed it to take a selcection of files to display info of instead of the usual selection.
    McUsr 2010-07-23 
    Changed it to display a Report in TextEdit
*)

set ReportText to ""
try
    set the selected_items_list to (choose file with prompt "Choose the files or folders you want to see info for for" default location (path to me) as alias with multiple selections allowed)
    if the (count of the selected_items_list) is 0 then
        with timeout of 900 seconds
            beep
            display dialog "No files or applications are selected." buttons {"Cancel"} default button 1
        end timeout
    end if
    set last_item to the last item of the selected_items_list as text
    repeat with this_item in the selected_items_list
        tell application "Finder"
            
            set this_item to this_item as text
            -- get the information for the item
            set item_info to info for alias this_item
            set item_kind to kind of alias this_item
            -- extract the various properties from the stored list
            set item_name to name of item_info
            set file_type to file type of item_info
            set item_creator to file creator of item_info
            set item_size to size of item_info
            set item_creation_date to the creation date of item_info
            set item_modification_date to the modification date of item_info
            set item_version to short version of item_info
            set item_owner to owner of item this_item
            set item_ownerP to owner privileges of item this_item
            set item_group to group of item this_item
            set item_groupP to group privileges of item this_item
            set item_everyonesP to everyones privileges of item this_item
            -- convert the true or false value to text
            set alias_indicator to alias of item_info
            if alias_indicator is true then
                set alias_indicator to "True"
            else
                set alias_indicator to "False"
            end if
        end tell
        tell application "System Events"
            set finfo to properties of item this_item
            
            set ftype to type identifier of finfo
        end tell
        set ReportText to ReportText & return & "==================================" & return & "Name: " & item_name & return
        set ReportText to ReportText & "Pathname: " & POSIX path of (this_item as alias) & return
        set ReportText to ReportText & "Kind: " & item_kind & return
        set ReportText to ReportText & "File Type: " & file_type & return
        set ReportText to ReportText & "Creator Code: " & item_creator & return
        set ReportText to ReportText & "UTI: " & ftype & return
        set ReportText to ReportText & "Size: " & item_size & return
        set ReportText to ReportText & "Version: " & item_version & return
        set ReportText to ReportText & "Alias: " & alias_indicator & return
        set ReportText to ReportText & "Cdate: " & item_creation_date & return
        set ReportText to ReportText & "Mdate: " & item_modification_date & return
        set ReportText to ReportText & "Owner: " & item_owner & return
        set ReportText to ReportText & "Owner Privileges: " & item_ownerP & return
        set ReportText to ReportText & "Group: " & item_group & return
        set ReportText to ReportText & "Group Privileges: " & item_groupP & return
        set ReportText to ReportText & "Everybodys Privileges: " & item_everyonesP & return
    end repeat
    
on error e  number n
    display dialog "error ::  " & e & n
end try
tell application "TextEdit"
    activate
    make new document at the front
    set text of front document to "F i l e i  n f o r m a t i o n " & return & ReportText
end tell



It will not compile: http://cl.ly/fb33ed31e50e29a7e78b

Sorry. I must restrict my self from online editing without testing! -Shall do that.

It works now.

So i tried to run it and it did not work, so i did the Terminal thing, but I’m not really comfortable putting all of what it returns pasted here, or even really in a pm - i’d hope you understand. What part of the returned text do you need?

Hello.
You can email it to me, I need everything of it to find a way to bypass it.

I also need to see the result of this.

ls -l ~/Desktop

I really need to se your username and your group and stuff to fix this.
I’ll respect your privacy concerns and commence by email
Though it would be of interest of post a general solution, without any of your specific data.