Last active
October 13, 2015 07:27
-
-
Save myaumyau/4159974 to your computer and use it in GitHub Desktop.
[MS-DOS]VSS日付指定履歴取得バッチ
This file contains hidden or 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
@echo off | |
setlocal | |
rem カレントドライブ・カレントディレクトリをバッチファイルのディレクトリにする | |
cd /d %~dp0 | |
rem ====================================================================== | |
rem 環境パラメータ設定 | |
if not exist GetVisualSourceSafeHistory.ini ( | |
echo GetVisualSourceSafeHistory.iniが存在しません。 | |
exit /b 1 | |
) | |
call :INIT GetVisualSourceSafeHistory.ini | |
set path=%path%;%SS_FOLDER% | |
if defined DATETIME_FROM if defined DATETIME_TO ( | |
echo 開始終了指定 -Vd%DATETIME_TO%~d%DATETIME_FROM% | |
ss History %PROJECT% -R -Vd%DATETIME_TO%~d%DATETIME_FROM% "-O&%OUTPUT_FILE%" | |
) | |
if defined DATETIME_FROM if not defined DATETIME_TO ( | |
echo 開始指定 -V~d%DATETIME_FROM% | |
ss History %PROJECT% -R -V~d%DATETIME_FROM% "-O&%OUTPUT_FILE%" | |
) | |
if not defined DATETIME_FROM if defined DATETIME_TO ( | |
echo 終了指定 -Vd%DATETIME_TO% | |
ss History %PROJECT% -R -Vd%DATETIME_TO% "-O&%OUTPUT_FILE%" | |
) | |
if not defined DATETIME_FROM if not defined DATETIME_TO ( | |
echo 指定なし -#100 | |
ss History %PROJECT% -R "-O&%OUTPUT_FILE%" | |
) | |
echo 終了します | |
pause > NUL | |
pause > NUL | |
endlocal | |
exit /b | |
rem ====================================================================== | |
:INIT | |
rem %1 iniファイル | |
set DEBUG= | |
for /f "usebackq eol=; delims== tokens=1,2" %%a in (%1) do ( | |
@set %%a=%%b | |
) | |
set YYYYMMDD=%date:~0,4%%date:~5,2%%date:~8,2% | |
set HHMMSSFF=%time:~0,11% | |
set HHMMSSFF=%HHMMSSFF::=% | |
set HHMMSSFF=%HHMMSSFF:.=% | |
set HHMMSSFF=%HHMMSSFF: =0% | |
if not defined DEBUG ( | |
set DEBUG=0 | |
) | |
if %DEBUG% == 0 ( | |
set DEBUG= | |
) | |
exit /b |
This file contains hidden or 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
; VSS履歴取得用の設定 | |
; SS.exe のフォルダ | |
SS_FOLDER=c:\Program Files\Microsoft Visual SourceSafe | |
; 対象データベース | |
SSDIR=\\ServerName\VSS\Project1 | |
; VSSユーザー名 | |
SSUSER=Admin | |
; VSSパスワード | |
SSPWD=123456 | |
; 対象プロジェクト | |
PROJECT=$/Branch1 | |
; 出力ファイル | |
OUTPUT_FILE=changelog.txt | |
; ログファイル名 | |
LOGFILE=GetVisualSourceSafeHistory.log | |
; 取得日時FROM YY/MM/DD;hh:mm[aまたはp] | |
DATETIME_FROM=2012/11/02;0:0 | |
; 取得日時TO YY/MM/DD;hh:mm[aまたはp] | |
;DATETIME_TO=2010/06/28;14:15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment