recursivly checking maximum limit of directory

Discussion in 'Perl Misc' started by Thiagu.M, Apr 18, 2005.

  1. Thiagu.M

    Thiagu.M Guest

    Hi
    The maximum number of files to be stored in a directory is 10.If the
    maximum is reached then direcory name is incremented and used.(For
    example if FOlder1 contains 10 files the folder name is incremented as
    folder2).Before using Folder2 it has to be checked for existence and
    maximum limit.if it already contains 10 files then folder3 is assigned
    as directory name and checked for maximum limit....Like wise we have to
    check and store files in directory recursively.
    How to write it?
    Thiagu.M, Apr 18, 2005
    #1
    1. Advertising

  2. "Thiagu.M" <> writes:
    > The maximum number of files to be stored in a directory is 10.If the
    > maximum is reached then direcory name is incremented and used.(For
    > example if FOlder1 contains 10 files the folder name is incremented as
    > folder2).Before using Folder2 it has to be checked for existence and
    > maximum limit.if it already contains 10 files then folder3 is assigned
    > as directory name and checked for maximum limit....Like wise we have to
    > check and store files in directory recursively.
    > How to write it?


    I find your description a little vague, but more importantly: where does
    Perl come into it?
    Arndt Jonasson, Apr 18, 2005
    #2
    1. Advertising

  3. Thiagu.M wrote:
    > Hi
    > The maximum number of files to be stored in a directory is 10.If the
    > maximum is reached then direcory name is incremented and used.(For
    > example if FOlder1 contains 10 files the folder name is incremented as
    > folder2).Before using Folder2 it has to be checked for existence and
    > maximum limit.if it already contains 10 files then folder3 is assigned
    > as directory name and checked for maximum limit....Like wise we have to
    > check and store files in directory recursively.
    > How to write it?


    When you have learned enough Perl http://learn.perl.org/
    (or some other programming language) you'll know.

    If you don't want to do that, you can always hire a consultant:
    http://jobs.perl.org/

    Or, if you do know some Perl, but can't figure out a particular detail
    involved, please post the code you have written so far, and somebody may
    be willing to help you out. Before you post the code, please study the
    posting guidelines for this group:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
    Gunnar Hjalmarsson, Apr 18, 2005
    #3
  4. Thiagu.M

    Paul Guest

    Thiagu.M wrote:
    > Hi
    > The maximum number of files to be stored in a directory is 10.If the
    > maximum is reached then direcory name is incremented and used.(For
    > example if FOlder1 contains 10 files the folder name is incremented as
    > folder2).Before using Folder2 it has to be checked for existence and
    > maximum limit.if it already contains 10 files then folder3 is assigned
    > as directory name and checked for maximum limit....Like wise we have to
    > check and store files in directory recursively.
    > How to write it?
    >

    Write your requirements down step-by-step.

    When you have done this and it works on a bit of paper - the algorithm
    will then be designed.

    The next thing is to code the algorithm - perl can do it but so can a
    shell script.

    The important thing to do is to define it on paper ( and hence in your
    head ). You will probably find lots of holes in your current logic.

    I think the use of the word "recursively" may be leading you in a
    possibly incorrect direction - don't worry about recursion unless the
    algorithm demands it.
    Paul, Apr 18, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bill Loren
    Replies:
    0
    Views:
    637
    Bill Loren
    Aug 17, 2003
  2. John Taylor
    Replies:
    1
    Views:
    285
    Mark Hammond
    Feb 9, 2004
  3. Joey C.
    Replies:
    7
    Views:
    360
    Joey C.
    Oct 27, 2005
  4. Stan Brown
    Replies:
    2
    Views:
    72
    Stan Brown
    Oct 29, 2003
  5. phanhuyich
    Replies:
    4
    Views:
    264
Loading...

Share This Page