I’m using Windows 7 and I’m trying to list all the files in MyDocuments.
I get the path with
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
which is c:/Users/eyalw/Documents
Now I try to list the files with DirectoryInfo.GetFileSystemInfos(), and i get files that are inside the dir + directories from my user home, like My Music, My Pictures, My Videos.
i checked with the command line ‘dir’, and those dirs are not inside eyalw/Documents
so why the hack do i get them?
thanks in advance!
If you look at the
Attributesproperty, you;ll see that these are hidden symlinks (orReparsePoints) toC:\Users\eyalw\Music, etc.Windows Vista and Windows 7 create these hidden symlinks in case a program tries to write to
My Documents\My Pictures, etc, which existed in Windows XP.