Войти

Показать полную графическую версию : [решено] Напишите скрипт что-бы он вытаскивал из текстового документа


root221
10-07-2013, 03:04
Здравствуйте ув. форумчане!!

Напишите пожалуйста скриптик на bat, который из этого текстового документа будет записывать в новый текстовик только ip:port


serverbrowser.vdf
"filters"
{
"favorites"
{
"0"
{
"name" "AnTiSkyKa"
"address" "46.174.50.32:27204"
"lastplayed" "1373409696"
"appID" "0"
}

"1"
{
"name" "Лучший сервер cs 1.6 [#1]"
"address" "46.174.48.35:27223"
"lastplayed" "1373409696"
"appID" "0"
}

"2"
{
"name" "Greatplace only steam public"
"address" "46.174.49.25:27221"
"lastplayed" "1373409696"
"appID" "10"
}

"3"
{
"name" "Пойду, водки найду © 18+"
"address" "46.174.49.25:27293"
"lastplayed" "1373409696"
"appID" "0"
}

"4"
{
"name" "H4rdcore | Major Payne Army mode"
"address" "46.174.49.32:27214"
"lastplayed" "1373409696"
"appID" "0"
}

"5"
{
"name" "Это Фанк Детка! =)|[ЗомБиКи 4.3]"
"address" "46.174.49.22:27259"
"lastplayed" "1373409696"
"appID" "0"
}

"6"
{
"name" "Admiral[classic1000fps]18+"
"address" "46.174.48.152:27384"
"lastplayed" "1373409696"
"appID" "0"
}

"7"
{
"name" "Zombie Epidemic [Зомби]"
"address" "46.174.48.44:27208"
"lastplayed" "1373409696"
"appID" "0"
}

"8"
{
"name" "public-18+"
"address" "46.174.49.35:27358"
"lastplayed" "1373409696"
"appID" "0"
}

"9"
{
"name" "ДЕЕЕЕЕЕТРАН"
"address" "46.174.48.34:27295"
"lastplayed" "1373409696"
"appID" "0"
}

"10"
{
"name" "ZOMBIE_MOHCTPbI[CoOl]"
"address" "62.122.213.34:27225"
"lastplayed" "1373409696"
"appID" "0"
}

"11"
{
"name" "Паблик +14 Клана AvB"
"address" "46.174.49.27:27302"
"lastplayed" "1373409696"
"appID" "0"
}

"12"
{
"name" "[RUS](47/48) Cs-ActiVe.com | Biohazard"
"address" "46.32.69.154:27020"
"lastplayed" "1373409696"
"appID" "0"
}

"13"
{
"name" "pws-cs.ru | Zombie Apocalypse ® "
"address" "46.174.48.45:27255"
"lastplayed" "1373409696"
"appID" "0"
}

"14"
{

}



Пример.. ip:port

newserverbrowser.txt
195.64.199.2:27022
46.174.48.26:27223
141.105.68.30:27605
46.38.63.125:27015

Буду вам очень признателен если поможете.

Iska
10-07-2013, 05:39
@echo off
setlocal enableextensions enabledelayedexpansion

>newserverbrowser.txt (
for /f "usebackq tokens=2" %%i in (
`type serverbrowser.vdf ^| findstr.exe /r /c:".*address.*\..*\..*\..*:.*"`
) do (
echo %%~i
)
)

endlocal
exit /b 0

root221
10-07-2013, 19:53
спасибо за помощь, вы мне очень помогли.




© OSzone.net 2001-2012