I wanted to play a joke on a co-worker and replace all the addresses in the .URL files in their favorites with a funnier (to me) address.
Now there's a lot of easier ways to do this, like making a generic .URL file, or just deleting them and downloading some new ones, but I wanted to make it difficult and parse through all the files and leave everything in tact just change the address in the URL= line.
for /f "tokens=* delims=" %%g in ('dir /b ^| find ".url"') do (
for /f "usebackq delims=" %%a in ("%%g") do (
if /i "!u!" == "URL=" echo URL=http://lemonparty.org >> "%temp%\%%g"
if /i not "!u!" == "URL=" echo %%a >> "%temp%\%%g"
del /f /q *.url
copy /y "%temp%\*.url" *.url
del /f /q "%temp%\*.url"