# Changing My Documents target location



## beitingj (Feb 12, 2010)

I'm need some help on how to write a batch file to change the target location of My Documents back to it's default location (or a location I specify) on the C:\. Can anybody help with this??


----------



## TheOutcaste (Aug 8, 2007)

Do you just want to change the target, or do you also need to move the existing files and folders?
What OS?

Would be much easier to use the Move/Change Location feature from the My Documents Properties dialog


----------



## beitingj (Feb 12, 2010)

I just need to move the target location, no files. 

I understand its easy to move by going to properties of my documents however I really need to create a batch file


----------



## TheOutcaste (Aug 8, 2007)

For XP you can restore the default with this command:

```
Reg Add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /V Personal /T REG_EXPAND_SZ /D "[COLOR=DarkRed]%%USERPROFILE%%\My Documents[/COLOR]" /F
```
Replace the part in red to use a different path. If you don't need to use a variable, you can use a type of *REG_SZ* instead of *REG_EXPAND_SZ*

Note that this will not change the path for My Pictures, My Music, My Videos, or any other shell folders that are in the My Documents folder


----------

