Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I install Windows Vista/7, I move some of my user folders onto a new partition (i.e. Documents, Musics, Pictures, etc.). This does not include moving the whole User directory, just some of the data folders. %AppData% remains in it's default location (%SystemDrive%\Users).

I'm getting tired of manually moving each of these folder's by changing their location under the properties dialog. Does anyone know of a way that I can script this to apply to the folders that I wish?

share|improve this question
    
+1 i'm looking for something like this myself, for XP we had the Folder Redirector and all was good. :) –  Molly7244 Nov 24 '09 at 21:22
add comment

4 Answers

I usually move the folders to my separate partition and then symlink them back into the C:\Users folder. This has the advantage that legacy apps that tend to break on custom paths can access the folder as usual.

This snippet of batch script should do what you want. Note that you have to run it as Administrator for symlinking to work ( untested, YMMV ):

::Change this to the folder where you want to store your data
set DESTFOLDER="Z:\Path\on\other\partition"

::Switch to the current user's profile folder
::Change this to the folder you want to move from if you are moving another user's data
set SOURCEFOLDER="%USERPROFILE%"
pushd "%SOURCEFOLDER%"
for /d %%d in (Documents Music Pictures Videos) do
(
  ::Move the folder to the new partition
  move "%%d" "%DESTFOLDER%\%%d"
  ::Symlink it back to the original location
  mklink /d "%%d" "%DESTFOLDER%\%%d"
)

This is just of the top of my head, but it's similar to what I use for my Ubuntu install, where I symlink all of the subfolders of my home folder to my NTFS data partition.

share|improve this answer
    
Why not just move the whole %userprofile% instead of moving Documents, Music, etc? –  CharlesB Dec 6 '13 at 10:11
add comment

Belvedere from Adam Pash at Lifehacker might be what you're looking for.

Belvedere's friendly interface to create advanced rules to move, copy, delete, rename, or open files based on their name, extension, size, creation date, and more.

share|improve this answer
    
I think you missed the point. Basically, I'm trying to do this (support.microsoft.com/kb/310147), but with several of the folders, with some type of script. –  Evan M. Nov 25 '09 at 21:36
    
you're right I did. Sorry and good luck. –  outsideblasts Nov 26 '09 at 0:40
add comment

Try recording an autohotkey script. It's a very powerful macro recorder for windows. Do it once and save the script.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.