2

I have Windows 7 64 bit installed on my system. I have a question about "C:\ProgramData\Application Data" folder. It is mentioned here and here that "Application Data" is a Junction point which points to C:\ProgramData. So, i would expect the following command to list the contents of the C:\ProgramData folder (my ProgramData folder has folders like McAfee, Microsoft, Adobe, etc..)..

cd /d "c:\ProgramData\Application Data"

dir

However i do not see anything listed...However, if i were to traverse 1 more directory deeper and list the contents, then all the folders under that directory are listed...

cd /d "c:\ProgramData\Application Data\McAfee

dir

I do not understand this behaviour. Would anyone explain?

Community
  • 1
  • 1
Santhosh
  • 6,547
  • 15
  • 56
  • 63

1 Answers1

8

It's to allow backward compatibility for programs that assume the old name but to also prevent programs recursing the tree and finding both copies.

Here's an article about this from Raymond Chen - I thought he did it on his blog, though, so maybe there's more there.

Rup
  • 33,765
  • 9
  • 83
  • 112
  • Thank you very much for the link! excellent explanation by Raymond!! – Santhosh Aug 05 '10 at 13:38
  • A junction that links to itself is terrible design in many ways. I don't recommend it. It can cause a lot of problems more than it solves. – Sun Nov 04 '14 at 02:55