Short Names only works on C Drive

2019-02-26 00:34发布

问题:

I am trying to find the short name of a path on Windows.

For some reason the following command only works when run on the C drive

for /d %I in (*) do @echo %~sI

I would like the short name of a folder on my D drive.

回答1:

Check if your 8.3 notation is turnred on for the other drives: http://technet.microsoft.com/en-us/library/ff621566.aspx