Created
July 7, 2010 07:24
-
-
Save mgng/466414 to your computer and use it in GitHub Desktop.
This file contains 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
rem -------------------------------------------------------- | |
rem Echofon for Firefox の sqlite をお掃除するバッチ | |
rem -------------------------------------------------------- | |
@echo off | |
echo *** 実行するよー | |
pause | |
setlocal | |
set SQLITE_PATH="C:\tool\sqlite-3_6_23_1\sqlite3.exe" | |
set LIMIT_ID=17000000000 | |
set ROOT_DIR="C:\Documents and Settings\%username%\Application Data\Mozilla\Firefox\Profiles" | |
cd %ROOT_DIR% | |
for /f "usebackq tokens=*" %%i in (`dir /B`) do @set CHILD_DIR=%%i | |
cd %CHILD_DIR% | |
echo *** create backup | |
copy /Y twitterfox_1.9.sqlite twitterfox_1.9.sqlite.bak | |
echo *** delete | |
%SQLITE_PATH% twitterfox_1.9.sqlite "DELETE FROM timeline WHERE id < %LIMIT_ID% ;" | |
%SQLITE_PATH% twitterfox_1.9.sqlite "DELETE FROM statuses WHERE id < %LIMIT_ID% ;" | |
echo *** vacuum / reindex | |
%SQLITE_PATH% twitterfox_1.9.sqlite vacuum | |
%SQLITE_PATH% twitterfox_1.9.sqlite reindex | |
endlocal | |
echo *** done | |
pause | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment