2013-07-02 40 views
0

我在多個文件夾中具有相同的文件,但具有不同的描述(一個文件夾用於法語,一個用於英語)。 如果我在一個文件夾中做了一些更改,我還必須檢查另一個文件夾是否存在相同的文件並執行相同的更改。 是否有辦法檢出這些文件中的任何一個,並且在相同的操作中檢查它是否相同?立即在不同文件夾中籤出tfs

回答

0

不,沒有TFS提供的那種東西。

也就是說,編寫一個小的powershell腳本或批處理文件並不困難,它將您想要簽出的文件的名稱作爲參數,並在英文和法文文件夾中爲該文件調用tf checkout

您也可以將其作爲外部工具添加到Visual Studio中,並將項目文件名作爲參數傳遞給您,以便您可以從IDE調用它。

+0

好的。謝謝你。我會試試這個! – guest

0

這是我寫的一個批處理文件,它從多個文件夾中檢出一個文件,將最新文件複製到這些文件夾並檢查最新文件。修改和使用,你看到適合

echo off 
rem Batch file to copy latest template files from archive to c:\aia\addapt 3\template 
setlocal enableextensions enabledelayedexpansion 
rem 
echo checking out all instances of common.dll from tfs 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkout C:\rd\ADDaptv3\ADDapt3\ADDapt3Library\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkout C:\rd\ADDaptv3\ADDapt3\ADDaptObserverComponent\CAddaptObserver\ADDaptLibrary\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkout C:\rd\ADDaptv3\ADDapt3\ADDaptPrintComponent\CAddaptPrint\ADDaptLibrary\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkout C:\rd\ADDaptv3\ADDapt3\DriveComponent\CDrive\ADDaptLibrary\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkout C:\rd\ADDaptv3\ADDapt3\FaultFifoComponent\CFaultFIFO\ADDaptLibrary\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkout C:\rd\ADDaptv3\ADDapt3\RealTimeComponent\AddaptRealTime\AddaptLibrary\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkout C:\rd\ADDaptv3\ADDapt3\SignalAnalyzerComponent\CSignalAnalyzer\ADDaptLibrary\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkout C:\rd\ADDaptv3\ADDapt3\ViewModelComponent\CAddaptViewModel\ADDaptLibrary\common.dll 
rem 
echo Need to define lastest location of common library 
set /p CommonLib=Enter directory of common library: 
set commonsrc=!CommonLib!\Common.dll 
echo on 
copy /Y %commonsrc% C:\rd\ADDaptv3\ADDapt3\ADDapt3Library\ 
copy /Y %commonsrc% C:\rd\ADDaptv3\ADDapt3\ADDaptObserverComponent\CAddaptObserver\ADDaptLibrary\ 
copy /Y %commonsrc% C:\rd\ADDaptv3\ADDapt3\ADDaptPrintComponent\CAddaptPrint\ADDaptLibrary\ 
copy /Y %commonsrc% C:\rd\ADDaptv3\ADDapt3\DriveComponent\CDrive\ADDaptLibrary\ 
copy /Y %commonsrc% C:\rd\ADDaptv3\ADDapt3\FaultFifoComponent\CFaultFIFO\ADDaptLibrary\ 
copy /Y %commonsrc% C:\rd\ADDaptv3\ADDapt3\RealTimeComponent\AddaptRealTime\AddaptLibrary\ 
copy /Y %commonsrc% C:\rd\ADDaptv3\ADDapt3\SignalAnalyzerComponent\CSignalAnalyzer\ADDaptLibrary\ 
copy /Y %commonsrc% C:\rd\ADDaptv3\ADDapt3\ViewModelComponent\CAddaptViewModel\ADDaptLibrary\ 
echo off 
rem 
echo checking in all instances of common.dll into tfs 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkin /noprompt /comment:"Latest common.dll assembly" C:\rd\ADDaptv3\ADDapt3\ADDapt3Library\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkin /noprompt /comment:"Latest common.dll assembly" C:\rd\ADDaptv3\ADDapt3\ADDaptObserverComponent\CAddaptObserver\ADDaptLibrary\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkin /noprompt /comment:"Latest common.dll assembly" C:\rd\ADDaptv3\ADDapt3\ADDaptPrintComponent\CAddaptPrint\ADDaptLibrary\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkin /noprompt /comment:"Latest common.dll assembly" C:\rd\ADDaptv3\ADDapt3\DriveComponent\CDrive\ADDaptLibrary\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkin /noprompt /comment:"Latest common.dll assembly" C:\rd\ADDaptv3\ADDapt3\FaultFifoComponent\CFaultFIFO\ADDaptLibrary\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkin /noprompt /comment:"Latest common.dll assembly" C:\rd\ADDaptv3\ADDapt3\RealTimeComponent\AddaptRealTime\AddaptLibrary\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkin /noprompt /comment:"Latest common.dll assembly" C:\rd\ADDaptv3\ADDapt3\SignalAnalyzerComponent\CSignalAnalyzer\ADDaptLibrary\common.dll 
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\tf" checkin /noprompt /comment:"Latest common.dll assembly" C:\rd\ADDaptv3\ADDapt3\ViewModelComponent\CAddaptViewModel\ADDaptLibrary\common.dll 
rem 
set /p WAITONUSER=Enter return to continue 
echo All done!