Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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


Comment on Re: List Contents of Windows Directory Folder
Download Code
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1007002]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2014-09-23 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (241 votes), past polls