I have a directory with filenames that contain “funny” characters. I'd like to get the dos (8.3) filename for the files. How can I do that? My language of choice is Go.
C:\...\foo>dir /x
 Volume in Laufwerk C: hat keine Bezeichnung.
 Volumeseriennummer: 329F-C2FE
 Verzeichnis von C:\...\foo
29.09.2018  16:22    <DIR>                       .
29.09.2018  16:22    <DIR>                       ..
23.07.2009  01:52             5.526 CW9463~1.PDF cöw.pdf
               1 Datei(en),      1.922.706 Bytes
               0 Verzeichnis(se), 48.235.646.976 Bytes frei
I'd like to get the CW9463~1.PDF filename instead of cöw.pdf.
(I will use this filename to open a file for reading.)
                        
I have found a solution, but it doesn't really help me. (See the comment/warning from @eryksun)