473,388 Members | 1,408 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,388 software developers and data experts.

File Time comparison

Hi,
i have two files which are created at x and y time (date,Day,time).
I want to compare the time of each file and pick the latest file.

How can I do that?

thanks in advance.

Sada
Jun 8 '07 #1
3 2062
miller
1,089 Expert 1GB
Simply use one of the standard file test functions to determine the time of each file and then compare them.

perldoc -X
perldoc stat

- Miller
Jun 8 '07 #2
Thnaks Miller,

I am able to get the time of two files.
But I am not able to compare the times.
Jun 8 '07 #3
miller
1,089 Expert 1GB
What are you doing thus far? I won't be able to advise you without knowing what code you are using to determine the file date/time and the format of that date.

- Miller
Jun 8 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Lowell Kirsh | last post by:
I have a script which I use to find all duplicates of files within a given directory and all its subdirectories. It seems like it's longer than it needs to be but I can't figure out how to shorten...
10
by: Dennis Farr | last post by:
It has been suggested that rather than convert an already large flat file, with many similar rows, to XML, some type of header be attached to the file, containing some sort of meta-XML description...
68
by: Roman Ziak | last post by:
Hello, I just downloaded MS Visual Studio 2005 Express Beta. When I tried to compile existing valid project, I get a lot of warnings like 'sprintf' has been deprecated, 'strcpy' has been...
14
by: Mark Broadbent | last post by:
Does anybody know what is (factual please -not just guess) the quickest method to read data from a file? I am not interested in the format of the data (i.e. blocks, bytes, string etc) just that the...
5
by: Learner | last post by:
Hello, Here is the code snippet I got strucked at. I am unable to convert the below line of code to its equavalent vb.net code. could some one please help me with this? static public...
7
by: Alan | last post by:
Hi. I have programmed in C++ before, but I`m a couple of years out of practice. I am seeking some advice on getting started on a quickie project. . . . I have to read a 54MB text file and do a...
10
by: mickey22 | last post by:
Hi all, I have to perform binary comparison of the generated files each time I build my program. For example in my first build I generate a header file and data file and store them in...
3
by: hutch75 | last post by:
Question could also be asked, how to compare data between two arrays and perform an action (print cmd) everytime there is a match? The problem I'm having with the code below is that the comparison...
0
by: HalfCoded | last post by:
hi everyone, I am kind of stuck and therefore would really appreciate some clues: I actually have to run a script which has to compare two elements from two different files which are a blast...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.