Howto echo or get file timestamp (date) in command (cmd) .bat scriptBy neokrates, written on October 30, 2010 |
cmd bat snippet |
- neokrates
- Email: uwarov@yahoo.com
- Website: http://www.thinkplexx.com
- Join date: 05-31-09
- Posts: 20
Rate it
Ad
Poll
Loading ...
Most popular search terms:
Stats
-
Since publication, this page was visited 1143 time(s).
Print timestamp:
for %%a in (myfile.txt) do echo %%~ta
Get timestamp:
for %%a in (myfile.txt) do set myfiledate=%%~ta
To use the myfiledate inside the FOR loop you will probably need to enable delayed expansion (ENABLEDELAYEDEXPANSION), like:
@echo off @SETLOCAL ENABLEDELAYEDEXPANSION for %%a in (myfile.txt) do ( set myfiledate=%%~ta echo !myfiledate! )
|
TAGS
|
|
SOCIAL
|


















