|
From: | Michal Studniarek |
Subject: | Re: Loading data from file and omitting some extensions |
Date: | Wed, 22 Jan 2014 16:06:26 +0100 |
On 22 January 2014 11:07, st.michal88 <address@hidden> wrote:
Thanks Andy! This is really good but in fact I realised that it doesn't solve
my problem. My files are indeed classified as "plain text document" but it
doesn't have implicit .txt ending. Is there a way to do something similar
but not by filtering all the .txt but excluding e.g. .png?
Regards,
Michal
--
View this message in context: http://octave.1599824.n4.nabble.com/Loading-data-from-file-and-omitting-some-extensions-tp4661241p4661243.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
This will exclude png and gifif isdir(nr{a})
nr = readdir (pwd)
i=rows(nr);
for a=(1:i)
continue
end
printf('checking: %s\n',nr{a})
if length(regexpi(nr(a),'\.png$|\.gif$'){1})!=0
continue
end
% do stuff here
printf('processing: %s\n',nr{a})
end
--
/* andy buckle */
[Prev in Thread] | Current Thread | [Next in Thread] |