I've got a program that doesn't open files with excessively long filenames.

Is there a way of finding out what the actual 8.3 character filename is...

(i.e. "longfi~1.jpg" instead of "long filename.jpg")