Page 1 of 1 1
Topic Options
#113661 - 2004-02-09 04:16 PM Get date modified
Shaz Offline
Lurker

Registered: 2004-02-09
Posts: 3
Hi,
I'm new to kix and was wondering if someone could point me in the right direction.
I need to write a script which asks the user for a date and the searches a directory for files modified on the same date or day before. Once found these files need to me copied to another directory.

Top
#113662 - 2004-02-09 04:29 PM Re: Get date modified
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Welcome to the board!!

Try doing a search on this board for GetFiletime

Aaron
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#113663 - 2004-02-09 04:44 PM Re: Get date modified
Shaz Offline
Lurker

Registered: 2004-02-09
Posts: 3
The date is not in the file name, is there any function to read the file properties???
Top
#113664 - 2004-02-09 04:46 PM Re: Get date modified
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Eh?

GetFileTime() is a function that returns the last-modified time and date.

Top
#113665 - 2004-02-09 04:46 PM Re: Get date modified
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See the KiXtart Manual under GETFILETIME()!
_________________________
There are two types of vessels, submarines and targets.

Top
#113666 - 2004-02-09 05:09 PM Re: Get date modified
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
I think what you are looking for is something to read a log for example. Look into the use of READLINE.. Or, if an INI file, READPROFILESTRING (easier to use, BTW).

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#113667 - 2004-02-09 07:37 PM Re: Get date modified
Shaz Offline
Lurker

Registered: 2004-02-09
Posts: 3
Thats great guys,

Any idea how to go about checking if the date returned is older than X hours?

Top
#113668 - 2004-02-09 07:43 PM Re: Get date modified
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
See the UDF Forum, it contains numerous date-time-math UDFs.
_________________________
There are two types of vessels, submarines and targets.

Top
#113669 - 2004-02-10 10:00 AM Re: Get date modified
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
As Jens implies, KiXtart does not support date and time maths directly.

We have created a number of useful date calculators, and uploaded them to the UDF forum. Search the UDF forum ("all posts") for the word "capecod" - that should get you all the relevant hits.

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 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.062 seconds in which 0.026 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