Get the 8.3 (or short file name) of a folder in windows

It seems like on an NTFS partition there is something called 8.3 Name Creation. Its basically a short file name with a tilde ~. Problem i was facing was how to get the short file name for a folder? One way is just to keep trying different combinations, the other is is using the command dir /x /a. /a includes even hidden files.