the “display dialog” command is expecting a string. You are sending it an alias. While it is true that Applescript will coerce many classes into other classes automatically, it won’t coerce everything. Change:
The following routine should do pretty much what I think you’re aiming for, DE. (In case it helps, I’ve added comments to describe the result of each statement.)
set originals_folder to choose folder with prompt "Choose originals folder:" --> alias
set duplicates_folder to choose folder with prompt "Choose duplicates folder:" --> alias
set new_duplicates_folder to choose folder with prompt "Choose new duplicates folder:" --> alias
tell application "Finder"
set duplicate_names to name of files of duplicates_folder --> list of names (of the previously duplicated files)
set uncopied_files to files of originals_folder whose name is not in duplicate_names --> list of Finder references (of the missing files)
duplicate uncopied_files to new_duplicates_folder --> list of Finder references (of the newly duplicated files)
end tell
I have this script posted below. I target a .txt file which contains paragraphs of various file names like this:
jpeg1.jpg
jpeg2.jpg
jpeg3.jpg
etc.
etc.
This converts the text doc to applescript list. If I uncomment my “Display dialog” at the end I can see that each file is cycling thru and filling the variable “thename” just fine. It works great if my .txt file has a small list or if my SOURCE_IMAGE folder contains a few images. However, when I target a .txt doc with a large amount of files or if my SOURCE_IMAGE folder has alot of files (more than 25) the script gives me this error:
Finder got an error: Can’t set alias “Macintosh HD:Users:de:Desktop:DESTINATION” to file named "
I have this script posted below. I target a .txt file which contains paragraphs of various file names like this:
jpeg1.jpg
jpeg2.jpg
jpeg3.jpg
etc.
etc.
This converts the text doc to applescript list. If I uncomment my “Display dialog” at the end I can see that each file is cycling thru and filling the variable “thename” just fine. It works great if my .txt file has a small list or if my SOURCE_IMAGE folder contains a few images. However, when I target a .txt doc with a large amount of files or if my SOURCE_IMAGE folder has alot of files (more than 25) the script gives me this error:
Finder got an error: Can’t set alias “Macintosh HD:Users:de:Desktop:DESTINATION” to file named "