Remove lines that contain certain string in Hebrew from a srt subtitles file -
i'm trying read text subtitles file, read lines , delete lines contain specific string (in case 'היי
' , 'שלום
').
the idea while opening file, let user choose folder in go on *.srt
files , delete lines containing specific text.
the general idea is:
have list\array of "bad words"
while clicking program\file let user select directory.
it search each file in directory , each line @ file if has 1 (or more) of "bad words".
3.1. if - delete specific line.
would have written in batch programming language, yet i'm not sure how so. hope have requested possible , appreciate can provide.
so far, made code let select directory:
@if (@codesection == @batch) @then @echo off setlocal enabledelayedexpansion rem select folder via wsh shell.application browseforfolder method /f "delims=" %%a in ('cscript //nologo //e:jscript "%~f0"') set "folder=%%a" if not defined folder goto :eof cd "%folder%" goto :eof @end // jscript section var shl = new activexobject("shell.application"); var folder = shl.browseforfolder(0, "please choose folder.\nthis extension add \".hebsubs-tvil.me\" suffix each file of following types: *.ass; *.avi; *.mkv; *.mp4", 0, 0x00); wsh.echo(folder ? folder.self.path : "");
Comments
Post a Comment