I am not getting the file inside the images folder through this code. How can I get that file’s name in the given variable (filelist)?
set p to "/Users/sumeet/Desktop/images/"
set a to POSIX file p
set filelist to (names of items of (POSIX file a))
-- file "Macintosh HD:usr:local:bin:"
This will work :
You have to tell Finder to get the list of items. Also Finder only takes
aliaspaths, so you have to change the unix path to an alias (aaa:aaa:aaa:) format.You could also do it this way :