?
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
Medium Priority
?
579 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 Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

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

Ransomware Attacks Keeping You Up at Night?

Will your organization be ransomware's next victim?  The good news is that these attacks are predicable and therefore preventable. Learn more about how you can  stop a ransomware attacks before encryption takes place with our Ransomware Prevention Kit!

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…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

770 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