Page 1 of 1

List Directory with time stamp

Posted: 03 Jan 2012 11:13
by Maheshp
i want to prepare list of all excel files on a particular drive(e.g C:\)
i use dir /s /b c:\*.xls > filelist.xls this syntex
but it does not give date & time details
is any way i will get output with last modified date in excel sheet in below format
c:\abc.xls 03-01-2012 21:52:36
http://www.74mph.com/faq/FAQ00142.html

Re: List Directory with time stamp

Posted: 03 Jan 2012 11:40
by Squashman

Code: Select all

for /f "tokens=*" %%I in ('dir /a-d /b /s *.xls') do echo %%~dpnxI,%%~tI >>filelist.csv

Re: List Directory with time stamp

Posted: 04 Jan 2012 10:09
by Maheshp
Thank u so much...! Squashman
Appreciate your time & Help...! :P