Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # This script will move all the named folders into an archive folder. However, it won't just move the folders, it will move them in TFS as well.
- #
- # It doesn't do the commit for you - safer to let you do that.
- #
- # Jamie Thomson, 2013-03-27
- #
- param($root='c:\tfs\SomeFolder\')
- $TfExePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe"
- $Now = Get-Date -Format "yyyyMMddTHHmmss"
- $ArchiveFolder = "$root" + "Archive_" + "$Now"
- #mkdir $ArchiveFolder
- $folders = ("Folder1","Folder1","Folder1")
- foreach ($folder in $folders)
- {
- Write-Host "Folder=$folder"
- $Source = "$root" + $folder
- $Target = $ArchiveFolder + "\" + $folder
- & $TfExePath move $Source $Target
- }
- #cd c:\tfs\ASOS.BI\Cleanup\ODS\
- #tf
- #
- # This was a handy blog psot that helped when writing this:
- # http://stackoverflow.com/questions/8228729/expand-output-of-tf-exe-results-from-powershell
- #
- #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement