Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A more accurate Windows command prompt DIR modified time

Is it possible to view the last time a file was modified in Windows command prompt in milliseconds or even in seconds?

like image 666
KennyBartMan Avatar asked Feb 27 '13 13:02

KennyBartMan


People also ask

How can you determine the last date and time a Windows application file was modified?

Windows file properties You can also see the modified date by viewing the file properties. Right-click the file and select Properties. In the Properties window, the Created date, Modified date, and Accessed date is displayed, similar to the example below.

How do I fix my time in CMD?

3. Type "time" into the command prompt window and press "Enter." The current time setting will now display. To change it, type the proper time into the window in the "00:00:00" 24-hour format -- for example, "13:30:00" for 1:30 p.m. -- and press "Enter." The new time will now be saved.

Which time command switch would you use just to see the time in CMD?

TIME /T Key new_time : The time as HH:MM TIME with no parameters will display the current time and prompt for a new value. Pressing ENTER will keep the same time. /T : Just display the time, formatted according to the current Regional settings.

What is the most powerful command in CMD?

One of the most powerful tools in the CMD command library is the ASSOC command. Your computer associates certain file extensions with certain programs. This is how your computer knows to open Adobe when you double click a PDF file, or Microsoft Word when you double click a DOC file.


2 Answers

The robocopy answer does work, but another nice option that works from the standard Windows console (not DOS per se):

forfiles /c "cmd /c echo @file @ftime"

like image 159
mark Avatar answered Oct 18 '22 01:10

mark


There is no native Windows command line utility that supports viewing time stamps with a resolution of milliseconds.

Your best option would to either use a 3rd party tool or for a native solution (Vista+), use robocopy (supports seconds):

robocopy /L /TS . ..

Tracking a resolution finer than seconds might be trivial or useless as well depending on the file system being used. See http://msdn.microsoft.com/en-us/library/windows/desktop/ms724290(v=vs.85).aspx and http://jpsoft.com/help/index.htm?timestamps.htm

FAT has a write time resolution of 2 seconds.

like image 27
David Ruhmann Avatar answered Oct 18 '22 01:10

David Ruhmann