Finder got an error: Can't get every file of folder

tell application “Finder”
activate
set getPath to “/Users/me/Desktop/PhotosToWeb”
set fileList to every file of folder getPath
set loopFinish to count of items of fileList
end tell
This is just part of a script which will eventually (if I get this figured out) allow me to monitor a folder, when several images are placed in it, they are, using Graphic Converter, converted to RGB JPGs, with limited size using batch. But every time I try to run the script, I get the error “Finder got an error: Can’t get every file of folder” and it lists the folder in the script.

This is a modification of one of the scripts that is available at the Graphic Converter web site.

I’ve searched the forums and can’t seem to come up with examples of what I want to do.

Thanks.

Don

Hi Don,

AppleScript works with colon delimited paths,
slash delimited paths are used only in shell scripts (or in some rare special cases)

tell application "Finder"
	activate -- is not always needed
	set getPath to "Mac HD:Users:me:Desktop:PhotosToWeb:"
	-- or better and easier:
	set getPath to "PhotosToWeb:" -- the "root" folder of the Finder IS the desktop
	set fileList to every file of folder getPath
	set loopFinish to count fileList
end tell


I knew it had to be something simple like that. Thank you very much.

Don