|
|
#1 |
|
Possible to get folder name in Automator?
Hi,
I'm not a programmer but I'm trying to build an Applescript that will take all the files in a folder and create a playlist in iTunes from that folder. I can successfully get the action to complete, however, the name of the playlist is set to the path of every file within the folder. So the playlist name is super long, being the full path of every track in the folder back to back. Is there a way to capture JUST the folder name and set it as the variable to use when naming my playlist? Here's an image of the current workflow: Note the FolderName variable is just a placeholder.
|
|
|
|
0
|
|
|
#2 |
|
You can use a third party action or a Run AppleScript action to get the name of the folder to put into a variable, for example:
Code:
on run {input, parameters}
tell application "System Events" to return name of first item of input
end run
__________________
MacBook Pro / OS X Mountain Lion (10.8.3) / Xcode 4.6 / [various (much) older stuff keeping dust off the shelves] |
|
|
|
0
|
|
|
#3 |
|
Thanks for your reply.
I'll have to figure out the code, but would it read something like this: Code:
on run {input, parameters}
tell application "System Events" to return name of first item of input
filter input to only basefolder (totally made up command)
end run
|
|
|
|
0
|
|
|
#4 |
|
You can use a Filter Finder Items action, for example:
__________________
MacBook Pro / OS X Mountain Lion (10.8.3) / Xcode 4.6 / [various (much) older stuff keeping dust off the shelves] |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 04:22 PM.






Linear Mode
