![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | last access date for files 1) get-childitem | get-member Looking at the System.IO.FileInfo, i m interested in getting the last access date for file. Is this the property : LastAccessTime ? 2.) i wish to retrieve last access time 14 days before the stipulated date. how shld i retrieve it ? get-childitem d:\directory | where-object {$_.lastaccesstime -gt 14days} ??? |
My System Specs![]() |
| | #2 (permalink) |
| Guest | RE: last access date for files LastAccessTime gives the last time the file was last accessed LastWriteTime gives the last time the file was written to to list the files need something like get-childitem d:\directory | where{$_.lastaccesstime -gt ((get-date).adddays(-14))} -- Richard Siddaway Please note that all scripts are supplied "as is" and with no warranty "IT Staff" wrote: > 1) get-childitem | get-member > > Looking at the System.IO.FileInfo, i m interested in getting the last > access date for file. > > Is this the property : LastAccessTime ? > > > 2.) i wish to retrieve last access time 14 days before the stipulated date. > > how shld i retrieve it ? > > get-childitem d:\directory | where-object {$_.lastaccesstime -gt 14days} ??? > > > |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: last access date for files On Tue, 9 Jan 2007 17:05:20 +0800, "IT Staff" <jkklim@hotmail.com> wrote: >1) get-childitem | get-member > >Looking at the System.IO.FileInfo, i m interested in getting the last >access date for file. > >Is this the property : LastAccessTime ? For ordinary files yes. For SQL Server database files the LastAccessTime doesn't change to reflect each access to a database. Andrew Watt MVP |
My System Specs![]() |
| | #4 (permalink) |
| Guest | Re: last access date for files On Tue, 9 Jan 2007 17:05:20 +0800, "IT Staff" <jkklim@hotmail.com> wrote: >2.) i wish to retrieve last access time 14 days before the stipulated date. > >how shld i retrieve it ? Richard has shown you a solution if you are interested in a date range. If you want to see files written on a particular date use the following as a basis: get-childitem c:\* | where-object {$_.lastaccesstime.date -eq ((get-date).date.adddays(-7))} | format-table Name, LastAccessTime It gives you files accessed 7 days ago i.e. on 3rd January (at the time of writing). Andrew Watt MVP |
My System Specs![]() |
| | #5 (permalink) |
| Guest | Re: last access date for files In windows explorer, there is a coulmn called " Date modified" Is that date refer to "lastwritetime" ? For "lastaccesstime" , where is this information display ? is it somewhere in windows explorer as well ? "Andrew Watt [MVP]" <SVGDeveloper@aol.com> wrote in message news:m5aaq2tmeupvr67nfjossck8qphbfbl3sm@4ax.com... > On Tue, 9 Jan 2007 17:05:20 +0800, "IT Staff" <jkklim@hotmail.com> > wrote: > >>2.) i wish to retrieve last access time 14 days before the stipulated >>date. >> >>how shld i retrieve it ? > > Richard has shown you a solution if you are interested in a date > range. If you want to see files written on a particular date use the > following as a basis: > > get-childitem c:\* | > where-object {$_.lastaccesstime.date -eq > ((get-date).date.adddays(-7))} | > format-table Name, LastAccessTime > > It gives you files accessed 7 days ago i.e. on 3rd January (at the > time of writing). > > Andrew Watt MVP |
My System Specs![]() |
| | #6 (permalink) |
| Guest | Re: last access date for files "IT Staff" <jkklim@hotmail.com> wrote in message news:eod$opRNHHA.3668@TK2MSFTNGP02.phx.gbl... > In windows explorer, there is a coulmn called " Date modified" > > Is that date refer to "lastwritetime" ? Yes. Although it is also referred to as the last modified time. > For "lastaccesstime" , where is this information display ? is it somewhere > in windows explorer as well ? Right click on the file in windows explorer and select Properties. It's right there on the initial dialog box. -- Keith |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sort by date? And Folder missing files | Aridale | General Discussion | 0 | 07-17-2008 04:59 AM |
| Video folder files have no date | John Monahan | Vista General | 0 | 07-15-2008 09:58 PM |
| Sorting files by date modified | Katharine | Vista file management | 2 | 02-05-2008 01:06 PM |
| All files and folders appearing under their date of creation | Carnosaure | Vista performance & maintenance | 14 | 12-11-2007 12:40 PM |
| deleting files using a date criteria | Walid | PowerShell | 4 | 10-22-2007 02:32 PM |