Home | Site Map | Cisco How ToNet How To | Wireless |Search | Forums | Services | Donations | Careers | About Us | Contact Us|

Command to list file date stamp for created and modified?

Active Directory, Domain, DNS, WINS, DHCP, SBS, New Releases.

Command to list file date stamp for created and modified?

Postby guest » Wed Jun 10, 2015 4:48 pm

Q: Can you write a script that will list the files in the directory date stamp for created and modified?

A: Yes, you can use forfiles command, for example, to list all file name and modified date 6/10/2015
C:\temp>forfiles /D 06/10/2015 /C "cmd /c echo @file @fdate"

"switch3-20150610.log" 6/10/2015
"switchip2-20150610.log" 6/10/2015
"switchIP3-20150610.log" 6/10/2015
"syncfile01.txt" 6/10/2015

This is another example to list all file name and modified date after 5/10/2015

C:\temp>forfiles /D +05/01/2015 /C "cmd /c echo @file @fdate"

"2014bank.mdb" 5/31/2015
"hotfix" 5/12/2015
"sasip3-05050215.log" 5/5/2015
"sqlserver01 sharing.txt" 6/9/2015
"switch3-20150610.log" 6/10/2015
"switchip2-20150610.log" 6/10/2015
"switchIP3-20150610.log" 6/10/2015
"syncfile01.old" 5/28/2015
"syncfile01.txt" 6/10/2015
Tablet and Smartphone Setup Guide
http://www.quicksetupguide.com

Troubleshooting Vista Wireless
http://chicagotech.net/
guest
 
Posts: 10191
Joined: Mon Nov 27, 2006 1:10 pm

Return to Windows

Your Ad Here

Who is online

Users browsing this forum: No registered users and 3 guests

cron