The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Import multiple files with same extension from a folder
Replies: 3   Last Post: Sep 27, 2012 11:09 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
David Annetts

Posts: 59
Registered: 9/9/09
Re: Import multiple files with same extension from a folder
Posted: Sep 27, 2012 11:08 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi Dominik,

ifiles = Filenames["*.exp"];
idata = Import[#, "Filetype"]& /@ ifiles;

will import all the .exp files in a particular directory.

Depending on the content of these files, you'll need to modify
"Filetype". Some suggestions are "Text" or "Matrix".



On 27/09/2012 15:04, Dominik Hezel wrote:
> Hello,
> I have a folder with different files, e.g.
> test1.exp
> test2.exp
> test1.log
> test2.log
> ...
> The number of files and actual file names is unknown. I would like to import all files ending with .exp. How do I do this rather simple task?
> Thanks for any help.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.