PDA

View Full Version : Screwed up move of 'my documents' folder


Don J
December 5th 03, 12:28 AM
I've Moved the "My Documents" folder to a removable disk drive. I am now
unable to reverse it. I have fournd two different methods that are supposed
to reverse it. In both methods one starts by right clicking the folder to
be moved, then clicking the Properties on the context menu. In one you are
supposed to click the "move" butten, in the other you are asked to click the
"target" tab. In the first case there is no "move" button. In the second
there is no "target" tab. I assme that in both cases the absence of the
"move" button or the "target" tab is because the folder on which you are
working identifies a removable disc drive.


Don Johansen

Torgeir Bakken (MVP)
December 5th 03, 12:28 AM
Don J wrote:

> I've Moved the "My Documents" folder to a removable disk drive. I am now
> unable to reverse it. I have fournd two different methods that are supposed
> to reverse it. In both methods one starts by right clicking the folder to
> be moved, then clicking the Properties on the context menu. In one you are
> supposed to click the "move" butten, in the other you are asked to click the
> "target" tab. In the first case there is no "move" button. In the second
> there is no "target" tab. I assme that in both cases the absence of the
> "move" button or the "target" tab is because the folder on which you are
> working identifies a removable disc drive.

Hi

You can change the path to "My Documents" with a registry update. The "My
Documents" path is in the Personal value under the keys

HKEY_CURRENT_USER\
Software\Microsoft\Windows\CurrentVersion\Explorer \Shell Folders

and
HKEY_CURRENT_USER\
Software\Microsoft\Windows\CurrentVersion\Explorer \User Shell Folders

(both should be updated)


Here is a VBScript that redirects the pointer to "My Documents" (you need a
logoff/logon to see the change):

"Personal" is the value that is changed (it is placed under two different
registry keys).

' Change to correct path here
sMyDocPath = "U:\"

Set oShell = CreateObject("WScript.Shell")

oShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\" _
& "Explorer\Shell Folders\Personal", sMyDocPath, "REG_SZ"

oShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\" _
& "Explorer\User Shell Folders\Personal", sMyDocPath, "REG_EXPAND_SZ"


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter

Don J
December 5th 03, 12:28 AM
I did not correctly indicate the folder I had moved. It wasn't the "My
Documemts". It was the one on the other side of the link, the one in the
"Profile" folder. Making the registry change you suggest, therefore moves
the wrong folder.


Thanks,

Don Johansen

Torgeir Bakken (MVP)
December 5th 03, 12:30 AM
Don J wrote:

> I did not correctly indicate the folder I had moved. It wasn't the "My
> Documemts". It was the one on the other side of the link, the one in the
> "Profile" folder. Making the registry change you suggest, therefore moves
> the wrong folder.

Hi

For the profile folder, there is no such thing as you described in your first
post ("move" button and "target" tab), this is for the "My Documents" folder
only. I have no experience with moving profile folders around, my only
suggestion is that you with Windows Explorer try to drag and drop it back in
place where it originally was placed (or cut/copy and then paste).


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter

Google