Page 1 of 1 1
Topic Options
#116148 - 2004-03-15 01:54 PM Ways to get the date last modified/accessed
Mit Offline
Fresh Scripter

Registered: 2002-06-05
Posts: 36
Loc: Derby, UK
Is it possible, via KiX, to find the date that a file was last modified or accessed? I'ld like to create a script that will run through a directory structure and move all the "offending" files, along with their corresponding directory structure(!!), onto an area of the network that can be archived. Does anyone have a script that does this, or know of the calls that I can use to check the timestamps ?


TIA,
Tim.

Top
#116149 - 2004-03-15 02:14 PM Re: Ways to get the date last modified/accessed
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
The KiXtart built-in GetFileTime() will return the last modified time for closed files.

If you need the last accessed time, search the forums for information on the "file system object" (fso) which is an automation object that can provide more details.

Top
#116150 - 2004-03-15 02:18 PM Re: Ways to get the date last modified/accessed
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
There is a function already built just for you...

See fnGetFileProp() - Uses FSO to retrieve file properties for files and it's cousin, fnGetFolderProp() - Uses FSO to retrieve folder properties for folders.

Top
#116151 - 2004-03-15 07:47 PM Re: Ways to get the date last modified/accessed
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
See also the CleanDirectory() UDF in the UDF Forum.
_________________________
There are two types of vessels, submarines and targets.

Top
#116152 - 2004-03-16 03:32 AM Re: Ways to get the date last modified/accessed
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
Using the Robocopy.exe: Robust File Copy Utility

Windows Server 2003 Resource Kit Tools
http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en


This is a free utility from Microsoft that will do exactly what you're wanting to do.

Robocopy "\\server1\sharename\folder1\folder2" "\\server1\sharename\folder3" *.avi /COPY:DAT /XO /R:10 /MAXAGE:30

This is just a sample of running it. Read the documentation that comes with it. A very useful utility with many new enhancements in this version.

It even supports only logging what it would do without actually doing anything till you tell it to.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 259 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.052 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org