Created
September 10, 2009 11:06
-
-
Save fearphage/184476 to your computer and use it in GitHub Desktop.
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 | |
| REM save this file as a .bat or .cmd file and call it from anywhere | |
| set _installName=Opera | |
| if NOT #%1# == ## (for /f "useback tokens=*" %%a in ('%1') do (set _installName=%%~a)) | |
| if exist "%appdata%\Opera\%_installName%\sessions\autosave.win" ( | |
| set sessionFile=%appdata%\Opera\%_installName%\sessions\autosave.win | |
| ) else ( | |
| set sessionFile=%appdata%\Opera\%_installName%\profile\sessions\autosave.win | |
| ) | |
| for /f "delims== tokens=1,2 usebackq" %%I in ("%sessionFile%") do ( | |
| if "%%I" == "window count" ( | |
| echo.%%J | |
| goto DONE | |
| ) | |
| ) | |
| :DONE | |
| set _installName= | |
| set sessionFile= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment