Solved

Dos command to include when files were access date? (not modified) something added to this?   tree /f /a >tree.txt

Posted on 2011-03-11
8
557 Views
Last Modified: 2012-05-11

Hi,

I need to know when files were last accessed - the date.

So say a word doc:

I make a file on a monday - creation date.
I open / edit save it on tuesday - modify date.
I open close it on wed - last access date.

Is there a way to find this out?

I need to do this for a load of files.
Its a dispute between two people and one party needs to know access date of her files.

Thanks.




0
Comment
Question by:fcek
8 Comments
 
LVL 9

Expert Comment

by:x3man
ID: 35108312
You might be able to do this with Powershell, see: http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_26875294.html
0
 
LVL 3

Expert Comment

by:OrenRozen
ID: 35108463
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 35111474
DIR /TA

And reference the DIR command built-in help:
C:\Temp>dir /?
Displays a list of files and subdirectories in a directory.

DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]
  [/O[[:]sortorder]] [/P] [/Q] [/R] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

  [drive:][path][filename]
              Specifies drive, directory, and/or files to list.

  /A          Displays files with specified attributes.
  attributes   D  Directories                R  Read-only files
               H  Hidden files               A  Files ready for archiving
               S  System files               I  Not content indexed files
               L  Reparse Points             -  Prefix meaning not
  /B          Uses bare format (no heading information or summary).
  /C          Display the thousand separator in file sizes.  This is the
              default.  Use /-C to disable display of separator.
  /D          Same as wide but files are list sorted by column.
  /L          Uses lowercase.
  /N          New long list format where filenames are on the far right.
  /O          List by files in sorted order.
  sortorder    N  By name (alphabetic)       S  By size (smallest first)
               E  By extension (alphabetic)  D  By date/time (oldest first)
               G  Group directories first    -  Prefix to reverse order
  /P          Pauses after each screenful of information.
  /Q          Display the owner of the file.
  /R          Display alternate data streams of the file.
  /S          Displays files in specified directory and all subdirectories.
  /T          Controls which time field displayed or used for sorting
  timefield   C  Creation
              A  Last Access
              W  Last Written
  /W          Uses wide list format.
  /X          This displays the short names generated for non-8dot3 file
              names.  The format is that of /N with the short name inserted
              before the long name. If no short name is present, blanks are
              displayed in its place.
  /4          Displays four-digit years

Switches may be preset in the DIRCMD environment variable.  Override
preset switches by prefixing any switch with - (hyphen)--for example, /-W.

Open in new window

0
 
LVL 61

Expert Comment

by:btan
ID: 35114545
dir "<Path to target directory>"/T:C /T:W /S /Q >> "<path to dest output file>"
- for timestamp, it shows file creation (/T:C) , last written (/T:W). if you want, can add "/T:A" for last access

Reference - http://en.kioskea.net/forum/affich-162585-get-filenames-timestamps-batch-file

0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 15

Accepted Solution

by:
Russell_Venable earned 500 total points
ID: 35131276
I would just use DIR /TA /OD /S > Dir.txt

Recurses from the current folder you called it and all subfolders and sorts the oldest files first then lists the accessed times on the left side of the columns and then the listed file on the right column.
0
 
LVL 15

Expert Comment

by:Russell_Venable
ID: 35137257
Any news?
0
 

Author Comment

by:fcek
ID: 35138857

This worked.

Russell_Venable:I would just use DIR /TA /OD /S > Dir.txt


0
 
LVL 15

Expert Comment

by:Russell_Venable
ID: 35142085
Great! Glad it worked for you. It worked for me too! :)
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
The foremost challenge encountered by an investigator at the very beginning of a forensics investigation is, accessing a file/data to read/view its contents. Owing to the fact, a platform is necessary for both; opening as well as examining any file.…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now