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
571 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 96

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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 64

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

One of my most closely kept secrets is revealed in this discussion How to output text on the same line This question was recently posted in EE by Simon336697 (http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_2459…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

705 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