Move-LibraryDirectory

SYNOPSIS

Moves a Windows Library folder (My Pictures, personal, downloads, etc) to the given path

SYNTAX

Move-LibraryDirectory -libraryName <String> -newPath <String>
-DoNotMoveOldContent <CommonParameters>

DESCRIPTION

Libraries are special folders that map to a specific location on disk. These are usually found somewhere under $env:userprofile. This function can be used to redirect the library folder to a new location on disk. If the new location does not already exist, the directory will be created. Any content in the former library directory will be moved to the new location unless the DoNotMoveOldContent switch is used. Use Get-LibraryNames to discover the names of different libraries and their current physical directories.

PARAMETER

libraryName

The name of the library to move

newPath

The path to move the library to. If the path does not exist, it will be created.

DoNotMoveOldContent

If this switch is used, any content in the current physical directory that the library points to will not be moved to the new path.

EXAMPLE

code:powershell
Move-LibraryDirectory "Personal" "$env:UserProfile\skydrive\documents"
code:powershell
This moves the Personal library (aka Documents) to the documents folder off of the default skydrive directory.

LINK

Get-LibraryNames

Last edited Mar 14, 2013 at 5:12 AM by mwrock, version 1