I have a system that allows for pooling of request files. The request files are read and the data contained in them informs activation of a relational database system. This system already allows for specification of overnight processing, priority setting and node targeting. I have the idea that it would be nice to allow the setting of the earliest time period that the request can be read.

I have the idea that there could be two approaches to this. Either a tree structure of folders could be created, whereby the upper node is year and branches form the months and then the days and then hour. Or separate folders could tag all the time details in the folder name. If I use this second approach what convention do I use? Do I need to consider any Perl modules that use specific time specification string conventions?

I also need to consider the efficiency of the algorithm. I don't want my program to have to repeatedly check the same folder for a whole year. Maybe I need a combination of the two aforementioned methods, where folders get copied across on the day of processing.


Update: To codify the problem:
foreach ( @directories ) # foreach of the time stamped directories { $directory_name = $_; # I need to take the directory name here # I need to process the directory name here to give me a time tha +t the directory is labelled with my $date_time = ; # .... and to assign a value to $date_time my $now = ; Not sure how to get this value if ($date_time => $now ) # If the date has been passed { my $directory_to_move = $input_directory_CC."".$directory_name +; return $directory_to_move; } }

In reply to Approaches to time stamping request files by Win

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.