Search found 2 matches

by Rastamind
08 May 2010 00:46
Forum: DOS Batch Forum
Topic: echo >> hello.bat fail
Replies: 2
Views: 4268

Re: echo >> hello.bat fail

or

Code: Select all

for %%a in (
"echo hello >> hello.txt"
) do echo %%~a >> hello.bat
by Rastamind
25 Apr 2010 12:59
Forum: DOS Batch Forum
Topic: Remove first character of a file
Replies: 6
Views: 10845

Re: Remove first character of a file

Abuh wrote:D100318A.MLK ; D090814A.MLK ...
I want to rename them like: 10031801.TXT ; 09081401.TXT ...

Code: Select all

@echo off
setlocal enabledelayedexpansion
for %%a in (*.mlk) do (
set "filename=%%~na"
ren "%%a" "!filename:~1,-1!01.txt"
)