I see, so was it there to convert everything to lowercase so when its looking for that string the case of the letters won't be an issue?
Yes, that's right.
I take it that it didn't work before because it was looking for [www.lokotorrents.com] in lower case and couldn't find that exact string?
Yes, that's right too. The new filename was produced from the old one by using the string replace feature of the SET command
set newstring=%oldstring:A=B% where A is the string you are looking for and B is the string you want to replace it with. If B is absent it replaces A with nothing, i.e. removes it. It is case sensitive. For example
set string=Mary had a little lamb
set string=%string:Mary=John%
string becomes John had a little lamb
set string=%string:little =% (include the space after little!)
string becomes John had a lamb
would it have worked if we changed set deletestring=[www.lokotorrents.com] to set deletestring=[WwW.LoKoTorrents.CoM] ?
Yes, that's the other way we could have solved the problem.