now it's working well
Code: Select all
ren file.txt file-%date:~0,2%-%date:~3,2%-%date:~6,4%-%time:~0,2%-%time:~3,2%-%time:~6,2%.txt
Thank Dominion and have a nice week.
Code: Select all
ren file.txt file-%date:~0,2%-%date:~3,2%-%date:~6,4%-%time:~0,2%-%time:~3,2%-%time:~6,2%.txt
Code: Select all
en file.txt file-%date:~0,2%-%date:~3,2%-%date:~6,4%-%time:~0,2%-%time:~6,2%-%time:~0,2%.txt
Code: Select all
@echo off
color 4
set N=
(for /f "tokens=1-5 delims=:" %%d in ("%time%") do ceho rename
file.txt file%%d-%%e-%%f.txt)