powershell - Need command to get a file from TFS without a workspace -
What do I want to do with a specific version of a file from TFS on a place except for my workspace Using the command line (either tf.exe or powershell)
I want to do this so that it does not affect files in my workspace, and keep the file in the release folder.
tf.exe only supports getting files in your workspace.
I have not found any way to do this with PowerShear.
Anybody help me?
remit tf.exe tf $$ / path / to / file See txt / version: 1234 & gt; % Temp% \ file.txt # powershell $ tfs = get-tfsserver $ hostName -all $ tfs.vcs.DownloadFile ($ serverPath, $ fileName) # Even better: $ item = $ tfs.vcs in memory completely GetItem Manipulate ($ ServerPath) $ Ton GetItem (O) Overload $ Content Available = ([io.streamreader] $ item.DownloadFile ()) .ReadToEnd () $ Content | ? {Some condition} | Do-coolstuff
Comments
Post a Comment