Test in PowerShell code if a folder is a junction point?

前端 未结 6 685
梦谈多话
梦谈多话 2021-01-13 00:30

How can I test in PowerShell code if a folder is a junction point?

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-13 01:21

    FYI, if you happen to be running PowerShell Community Extensions, this info is available as output (and as a note property) on output of Get-ChildItem:

    21> gci .\Roaming\Microsoft\eHome
    
    
        Directory: Microsoft.PowerShell.Core\FileSystem::C:\Users...
    
    
    Mode           LastWriteTime       Length Name
    ----           -------------       ------ ----
    d----     2/15/2010 12:18 AM         DvdCoverCache
    d----      8/9/2009  1:10 AM     DvdInfoCache [\...
    d----      8/8/2009 11:51 PM         DvdInfoCache.orig
    d----    10/22/2009  7:12 PM         mcl_images
    

    However for programmatic access I would access the info via the Attributes property as the other poster suggests.

提交回复
热议问题