RE: Parent and Current Directories

2001-07-06 Thread Kipp, James
[EMAIL PROTECTED]] > Sent: Thursday, July 05, 2001 3:58 PM > To: [EMAIL PROTECTED] > Subject: Re: Parent and Current Directories > > > Hello SAWMaster, > > Thursday, July 05, 2001, SAWMaster <[EMAIL PROTECTED]> wrote: > > S> Hello group! > > S> I

Re[2]: Parent and Current Directories

2001-07-05 Thread Maxim Berlin
Hello SAWMaster, Thursday, July 05, 2001, Maxim Berlin <[EMAIL PROTECTED]> wrote: S>> I'm trying to list all files in a directory EXCEPT the current and S>> the parent directories. S>> ie. S>> . S>> .. S>> file1 S>> file2 S>> file3 S>> Is not what I want. I only want: S>> file1 S>> file2 S>

Re: Parent and Current Directories

2001-07-05 Thread Paul Johnson
On Thu, Jul 05, 2001 at 02:43:01PM -0500, SAWMaster wrote: > Hello group! > > I'm trying to list all files in a directory EXCEPT the current and the parent >directories. > > I thought I had the right code, but I don't. > > while($i < ($#filelist)) > { > if ((@filelist[$i] ne '.') || (@file

Re: Parent and Current Directories

2001-07-05 Thread Jeff 'japhy' Pinyan
On Jul 5, SAWMaster said: >while($i < ($#filelist)) >{ >if ((@filelist[$i] ne '.') || (@filelist[$i] ne '..')) >{ >print @filelist[$i]; >print "\n"; >$i++; >} >} The chief problem is your logic. if ($f ne '.' || $f ne '..') { print $f; } When '.' get

Re: Parent and Current Directories

2001-07-05 Thread Maxim Berlin
Hello SAWMaster, Thursday, July 05, 2001, SAWMaster <[EMAIL PROTECTED]> wrote: S> Hello group! S> I'm trying to list all files in a directory EXCEPT the current and S> the parent directories. S> ie. S> . S> .. S> file1 S> file2 S> file3 S> Is not what I want. I only want: S> file1 S> file

Parent and Current Directories

2001-07-05 Thread SAWMaster
Hello group! I'm trying to list all files in a directory EXCEPT the current and the parent directories. ie. . .. file1 file2 file3 Is not what I want. I only want: file1 file2 file3 I thought I had the right code, but I don't. while($i < ($#filelist)) { if ((@filelist[$i] ne '.') || (