Unlock all files but for a specific folder

Hi, all,

I’m struggling to find the answer to this one. I have two folders that will always have some locked files in them. I’m trying to create a script that will unlock any locked files in those two folders.

I’ve found scripts that will unlock anything selected, or unlock files from the path given by a prompt window. But I can’t work out how to simply put the path into the script.

tell application "Finder"
	set thepath to POSIX path of "/Users/username/Desktop/Mobius Locked/"
	set locked of every item of entire contents of thepath to false
end tell

Also tried a variation:

set thepath to POSIX path of "/Users/username/Desktop/Mobius Locked/"
tell application "Finder" to set theFiles to files of folder thepath
tell application "Finder"
	set locked of every item of theFiles of thepath to false
end tell

Would be awesome if someone could help. I’m sure it’s simple, just not for me.

Stumbled upon the answer:

Tell application "Finder"
	set locked of every item of folder "Macintosh HD:Users:username:Desktop:Mobius Locked:" to false
end tell

Hope this helps someone else.