Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal enabledelayedexpansion
- for /f "delims=" %%s in ('query session') do (
- set querysessionline=%%s
- set sessionmark=!querysessionline:~0,1!
- if "!sessionmark!" == ">" (
- set mysessionid=!querysessionline:~41,5!
- set mysessionid=!mysessionid: =!
- echo !mysessionid!
- exit /b !mysessionid!
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement