Running Script on Connected Volume
One of the members here suggested a script that lets me label folders a specific color if the name of the folder contains matching text from a CSV file.
Works fine on my Mac.
If I try to use it for folders on our server it does not work.
I'm running the script from my Mac connected to our server.
The files are on an external mount to the server.
The pathname of the folder is similar to
/Volumes/Folder/Working Folder
The server is connected via afp and IP address afp://00.0.0.000/Folder
I'm not very good at any of this so hoping someone sees something obvious I'm missing.
Script is below.
-- prompt the user for the file containing the folder prefixes
set JobPrefixes to paragraphs of (read file (choose file with prompt "Select the Job List file" of type "public.comma-separated-values-text"))
-- iterate through the prefixes
repeat with eachJob in JobPrefixes
-- make sure we don't have a blank line
if eachJob as text ≠ "" then
tell application "Finder"
-- change the label color of folders who match the prefix
-- 0 - None
-- 1 - Orange
-- 2 - Red
-- 3 - Yellow
-- 4 - Blue
-- 5 - Purple
-- 6 - Green
-- 7 - Grey
set label index of (every folder of folder jobsFolder whose name begins with eachJob) to 7
end tell
end if
end repeat