去掉每一行开头的所有0- @echo off
- for /f "delims=" %%i in ('dir /a-d/b *.txt') do (
- (for /f "usebackq tokens=*" %%a in ("%%i") do (
- for /f "tokens=*delims=0" %%b in ("%%a") do echo,%%b
- ))>$
- move $ "%%i"
- )
- pause
复制代码 只去掉每一行开头的第一位0- @echo off&setlocal enabledelayedexpansion
- for /f "delims=" %%i in ('dir /a-d/b *.txt') do (
- (for /f "usebackq tokens=*" %%a in ("%%i") do (
- set "a=%%a"
- if "!a:~,1!"=="0" set "a=!a:~1!"
- echo,!a!
- ))>$
- move $ "%%i"
- )
- pause
复制代码
|