I am indexing my mac with the colour tags and I desire a folder motion to repeat itself into new sub-folders so it routinely retains tagging sub-folders.
Which fields precisely have to be specified?
Methods to inform the TargetFolder is the final new created or positioned folder inthe ParentFolder?
I do not need it to promt however simply to let it assign a selected folder motion.
This script I discovered within the library:
property ChooseScriptPrompt : “Choose compiled script file(s) containing folder actions”
property ChooseFolderPrompt : “Choose a folder to connect actions”
property ErrorMsg : ” shouldn’t be a compiled script. (Ignored).”
on open DroppedItems
select folder with immediate ChooseFolderPrompt
set TargetFolder to the outcome as textual content
inform software “Finder” to ¬
set FAName to call of alias TargetFolder
inform software “System Occasions”
if folder motion FAName exists then
–Do not make a brand new one
else
make new folder motion ¬
at finish of folder actions ¬
with properties {path:TargetFolder} — identify:FAName,
finish if
finish inform
repeat with EachItem in DroppedItems
set ItemInfo to information for EachItem
if not folder of ItemInfo then
set FileTypeOfItem to file sort of ItemInfo
set FileExtensionOfItem to call extension of ItemInfo
set ItemName to call of ItemInfo
if FileTypeOfItem is "osas" or FileExtensionOfItem is "scpt" then
inform software "System Occasions"
inform folder motion FAName
make new script ¬
at finish of scripts ¬
with properties {identify:ItemName}
finish inform
finish inform
else
show dialog ItemName & ErrorMsg with icon warning
finish if
finish if
finish repeat
finish open
on run
my ChooseFileFromFAScriptFolder()
open the outcome
finish run
to ChooseFileFromFAScriptFolder()
attempt
set LibraryScripts to checklist folder (path to Folder Motion scripts folder from native area) with out invisibles
on error
set LibraryScripts to {}
finish attempt
attempt
set UserScripts to checklist folder (path to Folder Motion scripts folder from person area) with out invisibles
on error
set UserScripts to {}
finish attempt
if (rely LibraryScripts) + (rely UserScripts) is larger than 0 then
set ChosenScripts to select from checklist LibraryScripts & UserScripts with immediate ChooseScriptPrompt ¬
with a number of picks allowed
if class of ChosenScripts is boolean then
error quantity -128
else
set SelectedScripts to {}
repeat with EachScript in ChosenScripts
if EachScript is in LibraryScripts then
copy alias ((path to Folder Motion scripts folder from native area as Unicode textual content) & EachScript) to finish of SelectedScripts
else if EachScript is in UserScripts then
copy alias ((path to Folder Motion scripts folder from person area as Unicode textual content) & EachScript) to finish of SelectedScripts
finish if
finish repeat
return SelectedScripts
finish if
finish if
return {}
finish ChooseFileFromFAScriptFolder