Getting files in a folder

I can’t find out what I’m doing wrong I get this message.

This is my code

tell save panel
	set title to "Extract Resource to"
	set prompt to "Extract"
	set required file type to "iprs"
	set treat packages as directories to false
end tell
set theResult to display save panel with file name "iPod Resource"
if theResult is 1 then
	set rspath to (path name of save panel as string)
	do shell script "mkdir " & (quoted form of rspath)
	try
		do shell script "mkdir " & (quoted form of (rspath & "/pics"))
	end try
	tell application "Finder"
		set images to (files of (rspath & "/bmap/"))
	end tell
	repeat with i from 1 to the count of images
		display dialog POSIX path of (item i of images as alias)
	end repeat
end if

Hi,

never don’t use POSIX paths in the Finder


.
set HFS_rspath to (POSIX file rspath as text) & ":bmap:"
tell application "Finder"
	set images to files of folder HFS_rspath
end tell
.

Finder doesn’t do POSIX paths.

Side note: The string coercion is unneeded.

Try something like this:

tell save panel
	set title to "Extract Resource to"
	set prompt to "Extract"
	set required file type to "iprs"
	set treat packages as directories to false
end tell

set theResult to display save panel with file name "iPod Resource"

if theResult is 1 then
	set rspath to path name of save panel
	
	do shell script "mkdir -p " & quoted form of (rspath & "/pics")

	tell application "System Events"
		set images to files of POSIX file (rspath & "/bmap")
	end tell

	repeat with i from 1 to the count of images
		display dialog POSIX path of (item i of images)
	end repeat
end if

I got this message

.or, without the Finder, taking some of Bruce’s suggestions


tell save panel
	set title to "Extract Resource to"
	set prompt to "Extract"
	set required file type to "iprs"
	set treat packages as directories to false
end tell
set theResult to display save panel with file name "iPod Resource"
if theResult is 1 then
	set rspath to (path name of save panel)
	try
		do shell script "mkdir -p " & quoted form of (rspath & "/pics")
	end try
	set foundPics to paragraphs of (do shell script "find '" & rspath & "/bmap/' -maxdepth 1 -type f ! -name '.*'")
	repeat with i in foundPics
		display dialog i
	end repeat
end if

Note: there will be displayed two slashes (//) in the path. It doesn’t matter to process the files

Thanks I got it now