Re: Testing for Directories

2006-02-09 Thread Rod Butcher
$Bill Luebkert wrote: Rod Butcher wrote: Foo Ji-Haw wrote: Dirk Bremer wrote: What is the easiest method to detect whether or not a directory exists? I will need to create the directory/subdirectory if it is not already present. The file test -d does not seem to do the trick. What's wrong

Re: Testing for Directories

2006-02-09 Thread Foo Ji-Haw
-d could fail if a file exists with the same name as a dir you're expecting to find. Hmm, I am under the impression that no file can exist with the same name as a subdir in the same path. ___ Perl-Win32-Users mailing list

Re: Testing for Directories

2006-02-09 Thread $Bill Luebkert
Foo Ji-Haw wrote: -d could fail if a file exists with the same name as a dir you're expecting to find. Hmm, I am under the impression that no file can exist with the same name as a subdir in the same path. That's not what I said. I said if you found a file that had the same name as a

Re: Testing for Directories

2006-02-09 Thread $Bill Luebkert
Rod Butcher wrote: Do we need to bear in mind here that Perl, because of its Unix origin, considers a directory to be just a file containing a list of filenames ? So the distinction between file or directory need not be made ? Rather, we have an entity in the file system named Not

RE: Testing for Directories

2006-02-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: What is the easiest method to detect whether or not a directory exists? I will need to create the directory/subdirectory if it is not already present. The file test -d does not seem to do the trick. Is there a quick and low-overhead method of doing this without

Re: Testing for Directories

2006-02-08 Thread pDale
On 2/8/06, Dirk Bremer [EMAIL PROTECTED] wrote: What is the easiest method to detect whether or not a directory exists? I will need to create the directory/subdirectory if it is not already present. The file test -d does not seem to do the trick. Can you give an example where -d fails? --

RE: Testing for Directories

2006-02-08 Thread Dirk Bremer
It turns out that in a very long pathname that I had one-byte that was incorrect that was causing the file-test -d operator to fail, rightly so. My mistake! Dirk Bremer - Senior Systems Engineer - ESS/AMS - NISC Lake St. Louis MO - USA Central Time Zone 636-755-2652 fax 636-755-2503 [EMAIL

Re: Testing for Directories

2006-02-08 Thread Chris Wagner
At 11:13 AM 2/8/2006 -0600, Dirk Bremer wrote: What is the easiest method to detect whether or not a directory exists? I will need to create the directory/subdirectory if it is not already present. The file test -d does not seem to do the trick. Is there a What's wrong with -d? It works for me.

Re: Testing for Directories

2006-02-08 Thread Foo Ji-Haw
Dirk Bremer wrote: What is the easiest method to detect whether or not a directory exists? I will need to create the directory/subdirectory if it is not already present. The file test -d does not seem to do the trick. What's wrong with -d? It' is not a file test. It's a test if the path

Re: Testing for Directories

2006-02-08 Thread Rod Butcher
Foo Ji-Haw wrote: Dirk Bremer wrote: What is the easiest method to detect whether or not a directory exists? I will need to create the directory/subdirectory if it is not already present. The file test -d does not seem to do the trick. What's wrong with -d? It' is not a file test. It's a

Re: Testing for Directories

2006-02-08 Thread $Bill Luebkert
Rod Butcher wrote: Foo Ji-Haw wrote: Dirk Bremer wrote: What is the easiest method to detect whether or not a directory exists? I will need to create the directory/subdirectory if it is not already present. The file test -d does not seem to do the trick. What's wrong with -d? It' is not a