-1

I'm looking at a fresh out of the box, Windows 10 laptop.

Under the folder C:\Users\John.Doe\Documents File Explorer shows three "folders":

  • My Music
  • My Pictures
  • My Videos

I cannot see or access these "folders" from PowerShell nor the old cmd shell.

They do not appear to be shortcuts, symbolic links, hard links, or junction points.

What else is there? They appear to be some sort of reparse point but what? And how can they be detected by PowerShell?

halfer
  • 19,824
  • 17
  • 99
  • 186
Texaganian
  • 19
  • 6

1 Answers1

-1

They're junctions, at least according to the DIR command (which generally does not make things up).

Documents> dir /a
  :
2021-05-29  11:43    <JUNCTION>     My Music [C:\Users\iggy\Music]
2021-05-29  11:43    <JUNCTION>     My Pictures [C:\Users\iggy\Pictures]
2021-05-29  11:43    <JUNCTION>     My Videos [C:\Users\iggy\Videos]
  :

The junctions have the Hidden and System attributes, thus /a is needed. I don't know how those attributes affect Powershell use.

iggy
  • 1,328
  • 4
  • 3
  • Interesting. It's been so long since I've used cmd, I completely forgot about the /a switch. So now, can anyone explain why they don't seem to behave like normal junctions? – Texaganian Jun 11 '21 at 21:45
  • Iggy's answer pointed the way to "seeing" these objects in PowerShell. Because these are hidden, system objects, Get-ChildItem needs the -Force switch in order to return them. What still seems odd, though : 1. File Explorer "sees" them despite the Hidden & System attributes 2. Cmd dir -a says they are Junctions while PowerShell says they are folders – Texaganian Jun 12 '21 at 02:14
  • Argh! I don't seem to be able to format line breaks in that previous comment no matter what I try. Sorry. – Texaganian Jun 12 '21 at 02:19
  • @Texaganian It's an answer to an off-topic question, so it is liable to be downvoted. – Andrew Morton Jun 23 '21 at 18:43