3 Dec 2011 12:27
Re: howto extract each character from a text file to another text file.
Did it work for you?
On 30/11/2011 12:14, foxidrive wrote:
> This writes to *.bin and reads from *.txt files.
>
>
> <at> echo off
> for /f "delims=" %%a in ('dir "*.txt" /a:-d /o:n /b') do (
> for /f "delims=" %%b in ('type "%%a"') do call :next "%%b"
> )
> cls
> for /f "delims=" %%a in ('dir *.bin /b') do (
> for /f "delims=" %%b in ('find /c "%%~na" ^<"%%a"') do echo %%~na = %%b
> )
>
> pause
> GOTO:EOF
> :next
> echo %1
> set "name=%~1"
> set "num=-1"
> :loop
> set /a num=num+1
> call set "name2=%%name:~%num%,1%%"
> if not "%name2%"=="" (
> >>"%name2%.bin" echo %name2%
> goto :loop
> )
>
>
(Continue reading)
RSS Feed