Thank You for your continued support and contributions!
for i in $(\ls -d pathtodirectory)do MP4Box -ipod $idone
on open dropfiles -- drag 'n drop files onto application repeat with i from 1 to number of items in dropfiles set this_item to quoted form of POSIX path of item i of dropfiles do shell script "/usr/local/bin/MP4Box -ipod " & this_item with administrator privileges end repeatend open
property theExtensionsToProcess : {"m4a"} -- I.e. {"txt", "text", "jpg", "jpeg"}, NOT: {".txt", ".text", ".jpg", ".jpeg"}on open theDroppedItems repeat with a from 1 to count of theDroppedItems set theCurrentItem to item a of theDroppedItems tell application "Finder" set isFolder to folder (theCurrentItem as string) exists end tell -- Process a dropped folder if isFolder = true then processFolder(theCurrentItem) -- Process a dropped file else processFile(theCurrentItem) end if end repeatend openon processFolder(theFolder) -- NOTE: The variable theFolder is a folder reference in AppleScript alias format -- Retrieve a list of any visible items in the folder set theFolderItems to list folder theFolder without invisibles -- Loop through the visible folder items repeat with a from 1 to count of theFolderItems set theCurrentItem to ((theFolder as string) & (item a of theFolderItems)) as alias open {theCurrentItem} end repeatend processFolderon processFile(theItem) -- NOTE: variable theItem is a file reference in AppleScript alias format tell application "System Events" set theExtension to name extension of theItem set theFileType to file type of theItem set theTypeIdentifier to type identifier of theItem end tell if (theExtensionsToProcess contains theExtension) then set this_item to quoted form of POSIX path of theItem do shell script "/usr/local/bin/MP4Box -ipod " & this_item with administrator privileges end ifend processFile
Page created in 0.032 seconds with 21 queries.