I was replying to a question in the forums when I realized that this would make a great tip for the main site. Just like the original poster, I have a lot of desktop images, and sometimes I can't remember the name of the one that's currently displayed when I want to edit it (or trash it). So here's the AppleScript that I came up with to solve that problem...
tell application "System Events"
set my_desktop to value of (property list item "LastName" of ¬
property list item "1983938400" of property list item ¬
"Background" of property list file ¬
((path to preferences as Unicode text) & ¬
"com.apple.desktop.plist"))
display dialog my_desktop
end tell
This script looks in the com.apple.desktop.plist file in your user's Library/Preferences folder for the name of the current desktop image. On my Mac running 10.4.5, there are actually several plist items under Background, each of which contain entries for desktop images that are not being displayed, so it took some poking around to find the correct path.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20060507041822864