Hi - My idea of sending to a file and counting the lines is essentially the same as several other suggestions:
1) Charles King suggested outputting to a array and then checking the contents of the array, and 2) Pat Richards suggested adding a counter, which would have exactly the same effect without the need for any intermediary output. You could simply check the counter on exit from the file-counting loop, and if the number of lines indicates an empty directory, echo "No files in this directory". The screen output would look like a normal directory listing with the added "no files..." line. If you output to an array instead of to the screen, then you have the option of making a totally 'custom' looking screen report; i.e., if there are files, you output the array to the screen, else you output something else of your own design. HTH, /steven Steven Olson Alyption Media Group 104 S. Pine Street, Suite C Sandpoint, ID 83864 [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 208.263.5886 208.304.9064 (cell) ____ � The WDVL Discussion List from WDVL.COM � ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or use the web interface http://e-newsletters.internet.com/discussionlists.html/ Send Your Posts To: [email protected] To change subscription settings, add a password or view the web interface: http://intm-dl.sparklist.com/read/?forum=wdvltalk ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] To unsubscribe via postal mail, please contact us at: Jupitermedia Corp. Attn: Discussion List Management 475 Park Avenue South New York, NY 10016 Please include the email address which you have been contacted with.
