473,473 Members | 2,036 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need help to list the updated file in a directory

1 New Member
Hi

Can u help me in writing the below function in perl under windows

> We have some n number of files in a dir ( eg : 10 .txt files)
> In that abc.txt is latest modified

Now i would like to list the file name of the last moddified using a fucntion by filtering the other files

Pls can anyone help mi out inthis..

under windows

Thanks in advance
Sep 19 '06 #1
2 1884
viviandanga
1 New Member
From: Miss Vivian Danga
Abidjan Cote d'Ivoire .
Email:vivian_danga@yahoo.fr

Dear One,

I am Miss Vivian Danga the only Daughter of late Mr, Richard Danga the former rebel sponsor leader in Bouake west cost of cote d i'voire .I discoverd that my father deposited the sum of the sum of (10,800 000) Ten million eight hundred Thousand Million USA dollar in a security here in cote d' Iviore ,and now I am in hiding in one of the cities in Abidjan called Yopougoun due to infertility nature of my country politically.

I wish to invest this money in your country. I also plead you help me on the investment part of the business; you have a free hand of operation.

I will like you to send me your telephone number,I will send you the name of the security firm for you to open contact with them for withdrawal of the consignment to move it to your country for investment.

The money is in the position of a security company as a family treasure.

A legal process will take place to ensure mutual transfer.
All effort made to the successful of this transaction will highly be appreciated. I hope to get a favourable reply in due curse.

We can negotiate on the terms of assistance.

please email me back with my private id (vivian_danga@yahoo.fr)

Best regards,

Miss Vivian Danga
Sep 20 '06 #2
robin
6 New Member
Ms Danga's kind offer aside, you can get the file list for a directory as follows

@a = <C:/path/to/file>;

Then...

for each instance of $a[..] you can get the date last modified as follows

open(HANDLE, $a[..]);

my $date = localtime( (stat HANDLE)[9] );

close HANDLE;

So just whack that in a for loop and find the last modified

the [9] is from this list

0 dev device number of filesystem
1 ino inode number
2 mode file mode (type and permissions)
3 nlink number of (hard) links to the file
4 uid numeric user ID of file's owner
5 gid numeric group ID of file's owner
6 rdev the device identifier (special files only)
7 size total size of file, in bytes
8 atime last access time since the epoch
9 mtime last modify time since the epoch
10 ctime inode change time (NOT creation time!) since the epoch
11 blksize preferred block size for file system I/O
12 blocks actual number of blocks allocated
Sep 26 '06 #3

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

Similar topics

3
by: JPM III | last post by:
I wrote a PHP script that allows me to post HTML entries to files on my server without going through FTP, yadda yadda. It works fine, and last night it updated both files properly. Today, it...
2
by: Keith Kowalski | last post by:
I anm opening up a text file reading the lines of the file that refer to a tif image in that file, If the tif image does not exist I need it to send an email stating that the file doesn't exist...
5
by: Dean Slindee | last post by:
I store several application settings in the project's "app.config" file. I also have a form that reads these values and displays them in a listview so that the user can adjust them. My question...
5
by: nospam | last post by:
Hi there, I'm using VBScript to display a list of the ten most recently updated pages on my web site. Right now, the script lists the filenames and the date modified in a given directory. ...
4
by: thoseion | last post by:
Hi, I am trying to get a program working whereby directory and file names are read into a list. I have been given the original list structure - it appears that the directory names should be added...
6
by: tgnelson85 | last post by:
Hello, C question here (running on Linux, though there should be no platform specific code). After reading through a few examples, and following one in a book, for linked lists i thought i would...
0
by: NatsoumiMaya | last post by:
hi ppl, i have a code to write in C where i have to implement the mkdir, rm, rmdir and touch functions using double linked lists...im haveing trouble with it...here is what i have so far: #ifndef...
2
Colloid Snake
by: Colloid Snake | last post by:
Hello everyone- I am working on a shell script to parse out a Node.def file that contains the hostname, version, IP address, and date updated. There is a separate .def file for each node (of which...
9
by: kkhan5000 | last post by:
Hello, I am new to PHP and have put together the following code just by copying other examples from the web. Now I am stuck and would like to sort and display files alphabetically, and also filter...
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,...
1
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.