I needed a script to remove the linefeed from the first row of a text file.
Other - similar topics I've researched were confusing, and had many irrelevant or misleading responses,
If you only need the first line, reading with set /p is simpler than a FOR/F loop.
setlocal EnableDelayedExpansion
set /p line= < source_file.txt
<nul set /p ".=!line!" > outputfile.txt