Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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: 58
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,

SetDirectory["data/file/directory"];
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".

Regards,

Dave.

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]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.