Created
October 19, 2020 14:51
-
-
Save berkayyildi/4a5729874c19aa0ecfa4dc340ed92314 to your computer and use it in GitHub Desktop.
TFS Extract Pending Changes to Zip File - Visual Studio 2019
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Destination = "C:\Users\berkay.yildiz\Desktop\" | |
$RarApp = "C:\Program Files\WinRAR\Rar.exe" | |
$projectDirectory = "C:\SOFTWARE\MY_PROJECT_DIRECTORY\Codes" | |
Set-Alias tf "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TF.exe" #For Visual Studio 2019 | |
cd $projectDirectory | |
$changeset = tf status | % {[Regex]::Matches($_, "edit(.*)")} | % {$_.Groups[1].Value}| % {$_ -Replace " ",""} | |
ForEach ($files in Get-ChildItem $changeset) { | |
& $RarApp a $($Destination + "yedek" + ".rar") $($files.FullName) | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment