Skip to content

Instantly share code, notes, and snippets.

@segilbert
Created July 30, 2015 12:16
Show Gist options
  • Save segilbert/baad99cb9ec60a8fdb24 to your computer and use it in GitHub Desktop.
Save segilbert/baad99cb9ec60a8fdb24 to your computer and use it in GitHub Desktop.
Driver script, using move.directory.cmd command to deep copy a folder from C:\ to D:\, delete the folder once copied and create a sysmlink.
REM
REM ** USE AT YOUR OWN RISK **
REM
REM Uses move.directory.cmd command to deep copy a folder from C:\ to D:\
REM delete the folder once copied and create a sysmlink.
REM Simply pass in the folder to move.
REM
REM Visual Studio uses "\ProgramData\Package Cache" to store installed
REM packages. These packages are required for VS to uninstall packages
REM and VS in entirity. The issue is this folder can be 3-6 gigs in
REM size.
REM
REM The blog posts below outline the "Why?"
REM
REM http://blogs.msdn.com/b/heaths/archive/2012/07/26/how-visual-studio-2012-avoids-prompts-for-source.aspx?PageIndex=2#comments
REM http://blogs.msdn.com/b/heaths/archive/2012/03/07/why-visual-studio-11-requires-space-on-the-system-drive.aspx
REM http://blogs.msdn.com/b/heaths/archive/2014/02/11/how-to-relocate-the-package-cache.aspx
REM
call move.directory.cmd "\ProgramData\Package Cache"
REM
REM List below are additional areas that can be moved from C to D
REM to contribute saving space on C drive.
REM
REM call move.directory.cmd "\Program Files\Microsoft SQL Server\100\Setup Bootstrap"
REM call move.directory.cmd "\Program Files\Microsoft SQL Server\110\Setup Bootstrap"
REM call move.directory.cmd "\Program Files\Microsoft SQL Server\120\Setup Bootstrap"
REM call move.directory.cmd "\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap"
REM call move.directory.cmd "\Program Files (x86)\Microsoft SQL Server\110\Setup Bootstrap"
REM call move.directory.cmd "\Program Files (x86)\Microsoft SQL Server\120\Setup Bootstrap"
REM call move.directory.cmd "\Windows\Installer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment