This attribute is used to expand date and time of file.
The time in this format is hh.mm
But if I prefer time in format hh.mm.ss how can I get this value?
Thanks in advance
Dario
%~tI Expands %I to the date and time of file
Moderator: DosItHelp
Re: %~tI Expands %I to the date and time of file
Think you can't change the time format.
You could use a small included VBScript.
Regards
aGerman
You could use a small included VBScript.
Code: Select all
@echo off &setlocal
set "file=c:\your\file\full\name.ext"
>"%temp%\tmp.vbs" echo WScript.Echo WScript.CreateObject("Scripting.FileSystemObject").GetFile(WScript.Arguments(0)).DateLastModified
for /f "delims=" %%a in ('cscript //nologo "%temp%\tmp.vbs" "%file%"') do set "DateTime=%%a"
del "%temp%\tmp.vbs"
echo %DateTime%
pause
Regards
aGerman