How to get last modified date of a file

Microsoft Windows server 2003 r2 standar...
August 4, 2010 at 06:52:30
Specs: Windows Server 2003
Hi all,

I want to find last modified date of a file by using a batch file and I want to write that into an excel sheet.

Is it possible or not. If its possible please can you provide me the code for that.

Your help will be most appriciated. Its very urgent.

Thanks in advance

See More: How to get last modified date of a file

Report •

August 4, 2010 at 10:14:59
This will get the date and time into a var. If you want to strip out the time it will take a bit more. No idea how to get it into excel.

@echo off & setLocal EnableDELAYedeXpansion

for /f "tokens=* delims= " %%a in ('dir/b myfile') do (
set L=%%~Ta

Helping others achieve escape felicity


Report •
Related Solutions

Ask Question