473,386 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Determining file creation date?

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
3 11302
"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

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
*** 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: [ EuGeNe ] | last post by:
Hi all, I would like to write a script that downloads one file from a ftp server if the file creation date satisfy a condition. I can't figure out how to find from a ftp server what is the...
2
by: David Fickbohm | last post by:
People, I am trying to determine the creation date of files in a folder. I am using the following code to find the folder and confirm that files exist in the folder. If someone could give me an...
7
by: Marius III | last post by:
Hi there, I want to get the file version of a file in PHP. Do somebody have the code for this? Thanks alot!
4
by: wil | last post by:
Dear All, In the linux platform, is there anyway I can in a C program change the file create date? Thanks, wil.
8
by: Eddie Suey | last post by:
I want to add a new line to the begining of a text file. I dont want to write over existing data. How do I do this? the file is about 7 mb.
1
by: Tim Failes | last post by:
This seems a trival question, but I cannot get it to work properly... Essentially my question is, how can I create a text file, and guarantee it is given the current date/time as the Creation Time?...
6
by: KoRnDragon | last post by:
I know about getlastmod() but is there one for created date? If not is there some other way of getting the created date of a file?
1
by: hagaihe | last post by:
Hello, My application is writing relevent events to log file on local machine. Due to amount of transactions i need to open new log everyday and to save the last one according to the next flow: ...
3
by: Gordon | last post by:
I am currently working on some code for my CMS that creates a site folder, then creates all the necessary child folders inside it. The method that creates folders needs to insert into 2 tables so...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.