This thread follows an issue
reported by member CmdrDuh in my recent Batch Attribute Editor
thread. The problem arises from folder redirection in Windows7 (and possibly other OS's).
Introduction:Using the '
My Documents' folder as an example:
After using
vl-directory-files to list directories under the User directory ("C:\\Users\\<User>") in Windows7, there is the '
Documents' folder and the '
My Documents' folder.
However, the '
My Documents' folder is
redirected to the '
Documents' folder (when viewed in Explorer).
And so, although:
C:\\Users\\<User>\\My Documents
is a valid filepath (both
findfile / vl-file-directory-p return non-nil), it apparently contains no files (returned by
vl-directory-files), since its contents are redirected to the following directory:
C:\\Users\\<User>\\Documents
('My Documents' was used as an example, but this also applies to Music / Pictures etc, and I believe a redirection can be applied to any folder).
What I have tried:I can get a list of the Documents / Music / Pictures directories from:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
in the registry. But this does not tell me which folders are being redirected to these directories.
The Question:Is there a way to retrieve a list of which directories are being redirected and to which location? Or perhaps someone can suggest an alternative way around my problem?
Thanks for any advice, apologies if this was unclear or used incorrect terminology.
Lee