Search and archive script


I’m a noob when it comes to applescript. But i’m learning (so be gentle please :slight_smile:

I want to create a script that searches a network disk for color labeled folders. Then transfer those folders to another specified folder. So retrospect (archive software) can archive them.

What’s the best approach? I tried using Automator but there are no options for finding color labeled folders. So my best option is applescript I assume.

Does anybody have an example script I could work from.

Thanks in advance.

Sorry for the bad english but i’m Dutch

The Finder controls label color and calls it label index. 0 is no color, and 1 thru 7 are those in the Finder label choices, but not in that order.

set F to (choose folder)
tell application "Finder" to set P to label index of F

for a folder full of colored folders (set up 8 covering the range)

set F to (choose folder) -- the enclosing folder of the colored ones
set theColors to {}
tell application "Finder"
	set aFolder to folders of F
	repeat with oneF in aFolder
		set end of theColors to label index of oneF
	end repeat
end tell