Actually `dir /B` won't produce anything since dir isn't a real coomand -
it's a shell builtin.

This may help:

c:\>perl -e"for (<*>) { print $_, qq(\n) if(! -x $_ && -B $_ ) }"

Luke

On Thu, 29 Nov 2001, Carl Rogers wrote:

> At 08:09 PM 11/29/2001 +0000, [EMAIL PROTECTED] wrote:
> >How can I do more then one file test for file?
> >
> >I'm trying to test a list of files to see if they're a binary file, that
> >isn't executable.
>
> If I understand correctly, you want to check all files in a certain
> directory to see if they AREN'T executables?
> In WIN NT:
>
> foreach (`dir /B`)              # gives bare format of the files in the
> working directory
> {
>          if ($_ !~ m/\.exe/)
>          {
>          ## do whatever you want to the files that aren't .exe
>          }
>          else
>          {
>
>          }
>
> }
> Hope this helps
> Carl
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to