I'm trying to print each file name with a time stamp in batch file. This is my batch script:
@echo off
setlocal enabledelayedexpansion
for /R "C:\Users\user\Desktop\BdayClip" %%B in (*.*) do (
echo "%time::=-%%%~xG"
choice /d y /t 1 > nul
)
I'm getting all the files name with the same time stamp and a delay of 1 second as excepted. But the time stamp is not changing!
Someone online said that adding the enabledelayedexapnsion works for him, but it didn't change anything on my script.
The output as following:
6-32-12.34.png
6-32-12.34.png
6-32-12.34.png
Why is always the same time output on running this FOR loop?