Batch file edit text - small modification
Posted: 26 Mar 2021 01:59
Hi,
It was extremely helpful for me the topic viewtopic.php?f=3&t=4789#p27687 about "Batch file text edit" and the code of penpen (many thanks).
Is it possible to modify that code a little bit, in order to delete the entire line of text, when a specific word is found inside that line? (specifically "#EXTINF")
Also, I've tried to modify that code myself so I've tried to fully understand the mechanism of that code (is fully functional for me) but I wasn't able. I've tried to insert "debugging" echo's to display the values of the variables at each step so to understand the mechanism, but unfortunately I wasn't able (for example I do not understand how is used that %%b variable). I've read a lot about "Setlocal EnabledelayedExpansion" so to understand the code, but it seems there are still things I cannot catch.
Maybe a commented code will be useful.
Thank you,
It was extremely helpful for me the topic viewtopic.php?f=3&t=4789#p27687 about "Batch file text edit" and the code of penpen (many thanks).
Is it possible to modify that code a little bit, in order to delete the entire line of text, when a specific word is found inside that line? (specifically "#EXTINF")
Also, I've tried to modify that code myself so I've tried to fully understand the mechanism of that code (is fully functional for me) but I wasn't able. I've tried to insert "debugging" echo's to display the values of the variables at each step so to understand the mechanism, but unfortunately I wasn't able (for example I do not understand how is used that %%b variable). I've read a lot about "Setlocal EnabledelayedExpansion" so to understand the code, but it seems there are still things I cannot catch.
Maybe a commented code will be useful.
Thank you,