Jump to content
  • 0

Using Applescript To Add Folders To Mp3 Disc


dpg50000

Question

I'm trying to get Toast 9 to add all the subfolders of a chosen folder to a new MP3 Disc. The attached script works fine except it adds the source folder, then puts all the subfolders inside it.

 

IE Disc layout becomes

 

Source Folder

----> subfolder 1

----> subfolder 2

 

How do I add just the subfolders of folderSelected?

 

 

set folderSelected to choose folder "Select a folder"

 

tell application "Finder"

set folder_name to name of folderSelected

end tell

 

tell application "Toast Titanium"

activate

set myDisc to make MP3 disc

set name of myDisc to folder_name

add to myDisc items folderSelected

end tell

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Sorted it with a small code change:

 

 

set folderSelected to choose folder "Select a folder"

 

tell application "Finder"

set folder_name to name of folderSelected

set sourceList to every folder of folderSelected

set NoOfFolders to number of items in sourceList

end tell

 

tell application "Toast Titanium"

activate

set myDisc to make MP3 disc

set name of myDisc to folder_name

repeat with j from 1 to NoOfFolders

add to myDisc items (item j of sourceList as alias)

end repeat

end tell

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...