I'm having a bit of an issue in the link there is a text file and you will notice that first character is unknown symbol and after batch tries to for loop it only copies that first character and stops there.
Is there a way to tell batch to continue or to warn him before that there is unknown symbol? or even delete it and proceed with the rest of file?
Link to text file:
https://easyupload.io/eknrriScript:
:: Turn echo off
@echo off
:: Enable extensions
SETLOCAL EnableExtensions
SETLOCAL EnableDelayedExpansion
:: Set input file
set "InputFile=index.txt"
:: Set output file
set "OutputFile=output.txt"
:: Check if output file exits if it does delete it
If Exist "%OutputFile%" Del "%OutputFile%"
:: Loop through input file
for /F "tokens=* delims=" %%A in ('Type "%InputFile%"') do (
:: Set line equal to file text
set line=%%A
echo !line!
)>>"%OutputFile%"