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

silvine

macrumors member
Original poster
May 22, 2008
63
3
Hi,

I am trying to write an Automator action that will select a folder on the desktop, scan it for songs, add them to itunes and then delete the folder.

Any ideas??
 
Hi,

I am trying to write an Automator action that will select a folder on the desktop, scan it for songs, add them to itunes and then delete the folder.

Any ideas??

Why would you want to scan the folder for songs then delete it?
I would assume any folder you have only contains songs otherwise you wouldn't want to delete it after the MP3s got added to iTunes.
 
i have itunes set up to automatically copy files to the music library. This means when i import the folder to itunes, the folder and the contents goes in the recycle bin after the import

I want automate these steps..
 
i have itunes set up to automatically copy files to the music library. This means when i import the folder to itunes, the folder and the contents goes in the recycle bin after the import

I want automate these steps..

Something like this?
 

Attachments

  • addToiTunesThenDelete.workflow.zip
    189.4 KB · Views: 90
That looks a lot like what I'm trying to do. How do I change it so I can pick any folder on my desktop, add that folder and then delete the folder?

EDIT: I can get it to add any folder I select to iTunes but it won't delete the folder after the finder plugin runs.
 
gotta use the variables, have it ask for folder then turn that into a variable and use the same variable to delete
 
It works great in Automator. However, when I save it as an application it won't delete the folder. Any ideas?
 
I've uploaded my application, which can be opened in Automator, if anyone wants to take a look?? :confused:
 

Attachments

  • add music.app.zip
    264.4 KB · Views: 56
That's why I put it up, it won't work for me either. I'm hoping someone here can fix it. ;)
 
I got it figured out!

Read this:
http://www.macosxhints.com/article.php?story=20080213200213250

Basically you get the string from the Variable by right-clicking on the Automator app you made to Show Package Contents.

Then open the document.wflow file with TextEdit.

Search for the Variable name. It's in this format:

Code:
       <dict>
            <key>UUID</key>
            <string>[B]F4557A41-C2C2-4118-BEBE-842800376CC2[/B]</string>
            <key>identifier</key>
            <string>com.apple.Automator.Variable.Path</string>
            <key>name</key>
            <string>MusicFolder</string>
            <key>value</key>
            <string>/Users/Mason/Desktop/test</string>
        </dict>


Instead of using Move Finder Items to Trash, use Run AppleScript:
Code:
do shell script "mv $([B]F4557A41-C2C2-4118-BEBE-842800376CC2[/B]) ~/.Trash"
 
You need to remember to change the String name inside the Run AppleScript part.

Let me know if you are still having problems getting this to work ;)
 

Attachments

  • Music Importer.zip
    248.3 KB · Views: 67
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.