I know there was another thread about this, but I can't find it either...
Here's a simplified version of what I'm currently doing. It requires the files paperjpg.rc, paperpng.rc, and paperbmp.rc in a Config directory (this of course is easy to modify to add other picture formats).
In my theme.rc:
ScanDirs Walljpg Wallbmp Wallpng
WalljpgFileOutputFormat *Popup "[filename]" !wallpaper .stretch "$walldir$\[filename]"
WallbmpFileOutputFormat *Popup "[filename]" !wallpaper .stretch "$walldir$\[filename]"
WallpngFileOutputFormat *Popup "[filename]" !wallpaper .stretch "$walldir$\[filename]"
In my themevars.rc (example):
In my popup.rc
*Popup "Wallpapers" Folder
Not shown, I've also added in options to set the walldir var (which is why I'm using a var for the path in the first place), and rescan/refresh the list, using comdlgls and a simple script.