Thread Subject: use "find files" as command instead of interactively

Subject: use "find files" as command instead of interactively

From: Andre

Date: 26 Jan, 2009 17:17:02

Message: 1 of 3

Hi!
I want to use the 'find files' search engine from Matlab as a command to search for files in a list (also in subfolders). For example

for i=1:length(list)
   destination(i) = findfile(file(i));
end

Is there a possibility to use this function as a command? Or does anyone know a user-built function (search engine) or a windows based application that i can run from command window?
Thanks for help!

Subject: use "find files" as command instead of interactively

From: Andre

Date: 26 Jan, 2009 20:10:25

Message: 2 of 3

I found a solution for Windows systems using the "dir" command:

[status,result] = dos(['dir "',filename,'" /S /B']);

Use the quotation marks for filenames with spaces. If status==0 the file was found and is saved in result. Problems may occur if wildcards are used and more than one result is found. The result is saved in one single string and has to be separated.

Subject: use "find files" as command instead of interactively

From: Miroslav Balda

Date: 26 Jan, 2009 21:37:02

Message: 3 of 3

"Andre " <lutz@ibnm.uni-hannover.de> wrote in message <glkr6e$ovh$1@fred.mathworks.com>...
> Hi!
> I want to use the 'find files' search engine from Matlab as a command to search for files in a list (also in subfolders). For example
>
> for i=1:length(list)
> destination(i) = findfile(file(i));
> end
>
> Is there a possibility to use this function as a command? Or does anyone know a user-built function (search engine) or a windows based application that i can run from command window?
> Thanks for help!

 Hi,
Maybe that the function ffpath.m from FEX, Id. 22501 could help you as well.
Mira

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
finding files Andre 26 Jan, 2009 12:20:04
command Andre 26 Jan, 2009 12:20:04
rssFeed for this Thread

Contact us at files@mathworks.com