Code: Select all
for %%a in (
"echo hello >> hello.txt"
) do echo %%~a >> hello.bat
Code: Select all
for %%a in (
"echo hello >> hello.txt"
) do echo %%~a >> hello.bat
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"
)