By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,822 Members | 1,424 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,822 IT Pros & Developers. It's quick & easy.

Determining file creation date?

P: n/a
Is there a function that determines when a file was created? Like if I
wanted to return all the files created in the last month from a directory,
is there a way to do that? I've googled and googled but can't find what I'm
looking for. Thanks
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Matt Traxinger" <Ma******@yahoo.com> wrote in
news:ck**********@news-int.gatech.edu:
Is there a function that determines when a file was created? Like if I
wanted to return all the files created in the last month from a
directory, is there a way to do that? I've googled and googled but
can't find what I'm looking for. Thanks


The "stat" function will help you determine a file's timestamp; as will
"filemtime".
Jul 17 '05 #2

P: n/a

Matt Traxinger wrote:
Is there a function that determines when a file was created? Like if I wanted to return all the files created in the last month from a directory, is there a way to do that? I've googled and googled but can't find what I'm looking for. Thanks


Instead of google, use http://www.php.net/

It's the best PHP manual on the web.

For the answer to your question, see
http://www.php.net/manual/en/function.filectime.php

Ken

Jul 17 '05 #3

P: n/a
*** Matt Traxinger escribió/wrote (Wed, 6 Oct 2004 17:09:35 -0400):
Is there a function that determines when a file was created? Like if I
wanted to return all the files created in the last month from a directory,
is there a way to do that? I've googled and googled but can't find what I'm
looking for. Thanks


If it's a Linux server, stop searching: creation date is not stored in most
Unix file systems. For the available times:

fileatime -- Gets last access time of file
filectime -- Gets inode change time of file
filemtime -- Gets file modification time

--
-+ Álvaro G. Vicario - Burgos, Spain
+- http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ Las dudas informáticas recibidas por correo irán directas a la papelera
-+ I'm not a free help desk, please don't e-mail me your questions
--
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.