Batch delete first 67 character all text file in folder
Posted: 09 Jun 2020 03:27
Hi
I'm trying to remove the first 67 characters and here's what I've got so far:
It's work as expected only for one file.
I need it to loop the code for all files in a folder.
Can someone help me out?
Thanks!

I'm trying to remove the first 67 characters and here's what I've got so far:
Code: Select all
@echo off & setlocal enabledelayedexpansion
set "txt=*.txt"
set N=
for /f "tokens=* delims= " %%a in ('type "!txt!"') do (
set /a N+=1
if !N! lss 3 set S=!S!%%a
)
> Result.txt echo.!S:~67!
for /f "tokens=* skip=2 delims= " %%a in ('type "!txt!"') do (
echo.%%a
) >> Result.txt
goto :eof
I need it to loop the code for all files in a folder.
Can someone help me out?
Thanks!
