6 ms·
I never used LANMAN, but the spec makes for some interesting reading... > NOTE: Due to a temporary restriction in CMD.EXE, it is not possible to use the DIR
by ammmir 7y ago
I never used LANMAN, but the spec makes for some interesting reading...
> NOTE: Due to a temporary restriction in CMD.EXE, it is not possible to use the DIR command on a UNC pathname, as in DIR \ \BIGSERVE\ANYNAME. This will be fixed in a future release. The DosFindFirst API call will accept UNC pathnames.
I always wondered about this... apparently the restriction carried over to the Windows port and was never fixed... maybe they didn't want to bloat cmd.exe with needing to "NET USE" UNC paths behind the scenes? Who knows!
- 0x0 7y agoBut dir does support UNC paths in cmd on windows, doesn't it?
- lrpublic 7y agoI’m pretty sure dir \\server\share has worked in cmd.exe since os2 1.1
- mixmastamyk 7y agoCan't `cd` into it though, making it somewhat useless.
- winthrowe 7y agoIt's time to drop cmd and use powershell, cd is an alias of set-location which handles this fine: PS C:\>cd \\server\share PS Microsoft.PowerShell.Core\FileSystem::\\server\share>
- mixmastamyk 7y agoI have no need for windows in over a decade.
- djpowell 7y agotip - if you want to cd into a UNC path, you can't; but you can pushd into one and it'll create a temporary drive letter mapping and unmap it when you popd out
- mikestew 7y agoWhere were you and your helpful tips 30 years ago when such knowledge would have been actually handy? :-) Cool tip, though.