Solved

Dos command to include access date of  afile? (not the modified date)

Posted on 2011-03-11
13
306 Views
Last Modified: 2012-05-11

Is there a DOS command?

E.g to view the last access date of a word .doc
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
  • 5
  • 3
  • 2
  • +1
13 Comments
 
LVL 43

Accepted Solution

by:
Steve Knight earned 500 total points
ID: 35108351
You can get the last accessed date of a file with a dir command using /ta:

dir C:\yourdir\yourfile\whatever.doc /ta


Steve
0
 
LVL 3

Expert Comment

by:4runnerfun
ID: 35108367
If you were to use the DIR command on the folder, you can use
DIR *.* /T A
which will list the contents of the directory sorted by last accessed date/time. The date/time will be listed for each file as well.
0
 
LVL 3

Expert Comment

by:4runnerfun
ID: 35108378
Ah, sorry. Dragon-it beat me to it.
0
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

 
LVL 43

Expert Comment

by:Steve Knight
ID: 35216808
Erm, I feel a little cheated there :-(
0
 
LVL 54

Expert Comment

by:Bill Prew
ID: 35216855
Yes, you were Steve, I already asked for a moderator review...

~bp
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 35217043
What are you doing here!
0
 
LVL 54

Expert Comment

by:Bill Prew
ID: 35217063
I get around...

~bp
0
 

Author Comment

by:fcek
ID: 35217103


Hi,

If I remember correct the
/ta  didint work (no space between characters)

the

/T A  (space between characters) did work.  

Correct me if Im wrong.

Thanks

 



0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 35217139
C:\Utils\hosts>dir /ta
 Volume in drive C is W2K BOOT
 Volume Serial Number is 30C9-7BBA

 Directory of C:\Utils\hosts

22/07/2004  06:06       <DIR>          .
22/07/2004  06:06       <DIR>          ..
22/07/2004  06:06                  403 hosts
22/07/2004  06:06                  218 lmhosts
22/07/2004  06:06                  279 Update Hosts files.bat
               3 File(s)            900 bytes
               2 Dir(s)   1,233,920,000 bytes free

C:\Utils\hosts>dir /t a
 Volume in drive C is W2K BOOT
 Volume Serial Number is 30C9-7BBA

 Directory of C:\Utils\hosts

File Not Found

C:\Utils\hosts>
0
 

Author Comment

by:fcek
ID: 35217194



Oh you have an answer for everything dragon-it  :-)

OK if you want to get a moderator to look at it a reaward points.

Apols  
0
 

Author Closing Comment

by:fcek
ID: 35221882
thanks everyone!

Fcek
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 35222096
glad we got there in the end :-)
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

Suggested Solutions

Title # Comments Views Activity
Refresh VDI (VMWare Virtual Desktop or Virtual VM) using command prompt or VB.net. 4 50
bat script to open stickynote with text 3 110
move command 5 67
how to diff two files 12 40
The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
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…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 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