Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

43 lines
771 B

@if "%_echo%" == "" echo off
if "%1" == "" goto usage
if "%1" == "-?" goto usage
if "%1" == "/?" goto usage
setlocal
goto %1
:usage
echo Usage: WHATS [extra OR missing OR diff]
goto :eof
rem
rem Report on files that are different from the SD version
rem
:diff
sd diff -sE *
goto :eof
rem
rem Report on files that are missing or extra from the SD version
rem
:missing
:extra
(for /f "tokens=3" %%i in ('sd have *') do @(
echo %%~pnxi
)) | sort > %tmp%\whats-server.txt
(for %%i in (*) do @(
echo %%~pnxi
)) | sort > %tmp%\whats-local.txt
if "%1" == "missing" (diff %tmp%\whats-server.txt %tmp%\whats-local.txt | trans /t "^< {?*}$" "$1")
if "%1" == "extra" (diff %tmp%\whats-server.txt %tmp%\whats-local.txt | trans /t "^> {?*}$" "$1")
endlocal