Hi,

I am new to perl (and lower level languages in general) so please be gentle with me.

I have a shared network folder that I need to monitor on a regular basis to ensure it doesn't become full. It stores project builds. Each project has its own folder containing multiple builds.

I need to produce a script that could initially produce a txt file maybe or just print to screen and list of build folders that are older than a given date and purhaps over a given size. So I will need to recurse through all project folders calculating build folders sizes and determine which match a given criteria.

without knowing much about perl I have become stuck very quickly and not know how to proceed. Do I use File::Find or do I use opendir - readdir - closedir? or is there a better solution.

Any help would be appreciate - I am not asking for someone to produce the script for me. Just point me in the right direction with example, code snippets and tutorials if you know or just and explanation of an algorithm.

I am working within a Win32 environment.

Hope you can help.

Thanks in advance.


In reply to Script to recurse directory down 2 levels and list directors by last modified and size by pauloke

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.