I need to implement another batch script into my batch script. I have a script that scans for strings and outputs them into a text file called "strings.txt" and I want to remove duplicate lines with another batch script. I want to implement that other batch script into mine somehow. Here is the script I need to apply.
@echo off
setlocal disableDelayedExpansion
set "file=%~1"
set "line=%file%.line"
set "deduped=%file%.deduped"
::Define a variable containing a linefeed character
set LF=^
::The 2 blank lines above are critical, do not remove
>"%deduped%" (
for /f usebackq^ eol^=^%LF%%LF%^ delims^= %%A in ("%file%") do (
set "ln=%%A"
setlocal enableDelayedExpansion
>"%line%" (echo !ln:\=\\!)
>nul findstr /ilg:"%line%" "%deduped%" || (echo !ln!)
endlocal
)
)
>nul move /y "%deduped%" "%~n1_deduped%~x1"
2>nul del "%line%"
I need all this to happen to my text file, but all this or a variation of this appear in my script.