or you want others to do the work for you…
well, we all have to learn somehow…
So replace this:
repeat with inFldr in tContents
if name of inFldr is "h_Collected Job" then move aFldr to Dest with replacing
exit repeat -- assuming only one such folder
end repeat
with this:
repeat with inFldr in tContents
if name of inFldr is "h_Collected Job" then
move aFldr to Dest with replacing
exit repeat -- assuming only one such folder
end if
end repeat
If only you knew all the things I do in our office - you would know that that comment couldn’t be farther from the truth!
I have swapped out the code as you describe. However, the script will copy the folder dragged over the droplet to ‘to archive’…but then it copies ALL folders in the ‘to archive’ over to ’ _to be catalogued’ not the content of ‘h_Collected Job’ from the ‘dragged folder’
have you tried any variations?
let us see what you’ve been trying.
like doing this:
if name of inFldr is "h_Collected Job" then move inFldr to Dest with replacing
that should copy ‘h_Collected Job’ over to Dest replacing every copy of ‘h_Collected Job’ so we end up with one ‘h_Collected Job’
just some adjustments needed then, we’re getting there aren’t we?
everything is in the script Adam provided, just adjust where needed and reapply routines to get the right result.
…then you must be prosperous and capable to pay someone to do your scripting work
In the end you might end up with something like this:
to carryOn(this_folder, added_items)
tell application "Finder"
set F to folders of this_folder -- the contents.
repeat with aFldr in F
try
set tContents to folders of entire contents of aFldr as alias list
on error
set tContents to folders of entire contents of aFldr as alias as list
end try
repeat with inFldr in tContents
if name of inFldr is "h_Collected Job" then
try
set goodContents to entire contents of inFldr as alias list
on error
set goodContents to entire contents of inFldr as alias as list
end try
repeat with finally in goodContents
if finally's name does not start with "." then move finally to Dest with replacing
end repeat
exit repeat -- assuming only one such folder
end if
end repeat
end repeat
end tell
end carryOn
You should now have all you need to set up that folder action the way you wanted it.
It’s been a long day here, I’m off to bed.
BTW: giving the vars meaningful names will make it a lot easier to read when you look at the code after years.