Path: news.mathworks.com!not-for-mail
From: "Sven " <sven.holcombe@gmail.deleteme.com>
Newsgroups: comp.soft-sys.matlab
Subject: move multiple files
Date: Tue, 17 Jun 2008 18:28:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <g38vni$bdh$1@fred.mathworks.com>
Reply-To: "Sven " <sven.holcombe@gmail.deleteme.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1213727282 11697 172.30.248.37 (17 Jun 2008 18:28:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 17 Jun 2008 18:28:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1326470
Xref: news.mathworks.com comp.soft-sys.matlab:474317



Hi there,

What's the best way to move many files, given that we have a
cell array of all the filenames to move.

It seems that the matlab movefile command can only take in
one file at a time (wildcards can be used... but that isn't
helpful in this instance).
>> movefile(cell_arr_of_filenames, 'destination'); % Error

When I wrap 'movefile' in a loop over my file list, things
get very slow, and I'm sure there's a more efficient way to
do this.

Any suggestions? Perhaps I need to resort to a system('...')
call?

Thanks for any input,
Sven.