Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: List Contents of Windows Directory Folder

by 2teez (Vicar)
on Dec 04, 2012 at 06:13 UTC ( #1007002=note: print w/replies, xml ) Need Help??

in reply to List Contents of Windows Directory Folder

Hi mua,
Taking a leap from previous comments on this thread, maybe you want something like this:

use warnings; use strict; use File::Find; use File::stat; find( \&wanted, '.' ); sub wanted { return if $_ eq '.' or $_ eq '..'; my $st = stat($_); print sprintf "Filename: %s, Size: %s, Date Modified: %s\n", $_, $ +st->size, scalar localtime $st->mtime; }
When more files are added to this folder, I need to append to the current text file
Please, take a look at function open
Hope this helps

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

Replies are listed 'Best First'.
Re^2: List Contents of Windows Directory Folder
by ColonelPanic (Friar) on Dec 04, 2012 at 10:22 UTC

    Also check out Merlyn's File::Finder, which offers a simpler interface for tasks like this.

    When's the last time you used duct tape on a duct? --Larry Wall
Re^2: List Contents of Windows Directory Folder
by mua (Initiate) on Dec 05, 2012 at 00:49 UTC
    This reply is also to everyone who replied for my cry for help. Thank you. 2teez, this looks like what I'm looking for. I will try it. Thanks. I will also try the other posts. Thanks.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007002]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2018-06-25 10:30 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.