× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Logistically speaking I would suggest NOT creating a convoluted
directory IFS or Windows structure EVER.

Obviously one smart choice would be to use a document management system
such as our WebDocs software where searchable metadata defines the
location of a file.

I digress..... :-)

If you still plan to aggregate files to the IFS, consider using a less
complex naming structure and use a more meaningful file names instead.

A folder for the user:

/home/PDF/username/A Report-20100321.pdf

Then you only need to worry about creating the folder one time instead
of creating a tree.

In any case, the following QSHELL command should work for creating a
tree:
STRQSH CMD('mkdir -p /dir1/dir2/dir3')

Regards,
Richard Schoen
RJS Software Systems Inc.
"Get the information you need. Now!"
Document Management, Workflow, Report Delivery, Forms and Business
Intelligence
Email: richard@xxxxxxxxxxxxxxx
Web Site: http://www.rjssoftware.com
Tel: (952) 736-5800
Fax: (952) 736-5801
Toll Free: (888) RJSSOFT


-----Original Message-----
message: 5
date: Mon, 15 Mar 2010 21:39:07 -0400
from: "Lennon_s_j@xxxxxxxxxxx" <lennon_s_j@xxxxxxxxxxx>
subject: Best way to create a directory tree on the IFS?

What?s the best way to create a directory tree on the IFS when only
some, but perhaps all, of the directory entries exist?

Suppose that the final directory & file will look something like:

/home/PDF/username/2010/03/21/A Report.pdf

I know the /home/PDF/ directory exists, but the username directory may
need to be created, as might the 2010 directory, or 03 or 21 before we
actually create the .pdf file.

Is the best way to work backwards a directory at a time checking if it
exists, then start building forward from there?

In the above example, if only /home/PDF/username/2010/ exists:
Check first for /home/PDF/username/2010/03/21/.
If that doesn?t exist, check for /home/PDF/username/2010/03/.
If that doesn?t exist, check for /home/PDF/username/2010/.
When /home/PDF/username/2010/is found:
Create /home/PDF/username/2010/03.
Create /home/PDF/username/2010/03/21/.

My initial thought is the QHFCRTDR API, which can create only one
directory level at a time and caused the above rumination. I?m
wondering if there is a better or easier way. Not considering high
volume needs, but elegant and easy to use would be nice.





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.