Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: List Contents of Windows Directory Folder

by 2teez (Priest)
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2016-10-21 16:46 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (289 votes). Check out past polls.