Path: news.mathworks.com!not-for-mail
From: "Ashish Uthama" <first.last@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: if more than a file in dir execute code
Date: Tue, 06 Oct 2009 09:33:14 -0400
Organization: TMW
Lines: 14
Message-ID: <op.u1drxodwa5ziv5@uthamaa.dhcp.mathworks.com>
References: <ha9ast$c8q$1@fred.mathworks.com>
NNTP-Posting-Host: uthamaa.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1254835994 28595 172.31.57.126 (6 Oct 2009 13:33:14 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 6 Oct 2009 13:33:14 +0000 (UTC)
User-Agent: Opera Mail/10.00 (Win32)
Xref: news.mathworks.com comp.soft-sys.matlab:575309


On Sun, 04 Oct 2009 01:13:01 -0400, A Ram <shal.hat@gmail.com> wrote:

> Hi,
>
> How can I code the following in matlab?
>
> If there is more than 1 xls file in the current directory then execute a  
> given comman.
>
> Thanks !

Inspect the value of dir('*.xls') (help dir).
Use SIZE/LENGTH to obtain the number of XLS files in the directory.