@echo off
setlocal ENABLEDELAYEDEXPANSION
set LAST=
set INFILE=%1
set ORDER=%2
set ORDER=%ORDER:~0,1%
if not "%ORDER%"=="s" goto defaultorder
(for /f "tokens=10,11" %%a in ('type %INFILE%') do @echo %%a %%b ) | sort > out.txt
goto endorder
:defaultorder
(for /f "tokens=10,11" %%a in ('type %INFILE%') do @echo %%b %%a ) | sort > out.txt
:endorder
for /f "tokens=1,2 delims= " %%a in ('type out.txt') do (set THIS=%%a %%b && if not "!THIS!"=="!LAST!" echo !THIS! && set LAST=!THIS!)
endlocal