Can AS grab a file without knowing its name?

A simple question

I have a series of folders, ie folder1, folder2, etc… each with a single pdf file.

Can AS be coded to grab the pdf file inside the folder without specifically coding in the files name…

that is can AS grab a file from a path…


where * can be anything as long as there is only one pdf file in that folder.


Thanks in advance.