recursivly checking maximum limit of directory

T

Thiagu.M

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?
 
A

Arndt Jonasson

Thiagu.M said:
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?
 
G

Gunnar Hjalmarsson

Thiagu.M said:
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
 
P

Paul

Thiagu.M said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top