Careful out there. The 8.3 filename is synthesised from the LFN on the fly (it isn't static and isn't stored). The value of ~N depends on what other files there are in the directory/folder.
So mylongappname.exe might be MYLONG~1.EXE in one situation and MYLONG~2.EXE in another.
Old apps that don't understand LFNs can give you serious grief, particularly if they're doing any batch processing. Any files changed to 8.3 will have no idea what their previous LFN was.
LFNTOOLS -
http://lfntools.sourceforge.net/ - might be useful to you and LFNDOS and DOSLFN (TSRs that handle long filenames under DOS) are of historical interest.