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
562 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 62

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
New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

 
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

New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

910 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

19 Experts available now in Live!

Get 1:1 Help Now