using wild card to ignore parts of file names

I need to send a command to load files based on only the first few characters of their name.

example: the real file is P591.02 bird on tree

but i’d like the command to only look for P591.02 and ignore bird on tree, then load that file

once again, help is appreciated!

Something like this might work.

set search_string to "P591.02"
set fol_ to (choose folder)

tell application "Finder"
	set files_ to (files of fol_ whose name begins with search_string) as alias list
end tell

repeat with file_ in files_  -- process each file
	-- do something to file_
end repeat

– Rob

Thanks Rob, works nicely, but I now need to set the folder - fol_ without using
(choose folder)

I’d like to derive the folder name something like

set fol_ to (characters 1 thru 4 of some_variable)

can’t get the syntax right, what do I set this “as”

???

figured it out, I did:

set fol_ to (myvariable) as alias

I have just the opposite situation. I have a folder with over 300 items that start with different words but all have the same ending “Name-Old.ext” how would the wildcard selection work to identify the first file, change the ending to “Name-New” but leave the beginning of the file name unchanged?
Such:
change, XXXXname-old.ext
to, XXXXname-new

where XXXX could be any number of integers, XXXXXX, XX, XXX, XXXXXXXX, etc.
I can get to the folder, and select the first file;
––if file (old-name.ext exists) select first file
but have been stumped in how to change the file name then select the next, and so on.

Thanks for the piggy back.
Sparky