Message Boards Message Boards

GROUPS:

How to import many pictures all at once?

Posted 9 years ago
6562 Views
|
6 Replies
|
5 Total Likes
|

Hello

I have over 100 pictures in my folder and I want import them all at once.

The pictures have following names: wavelength_001

For example.:

1510000_001 

1510500_001 

1511000_001 

1511500_001 

1512000_001 

... 

1630000_001 

The last five numbers don't change: 00_001

It would be nice if I can call every picture by its name.

Do you have a good idea how to do this? Maybe a While loop?

Best regards,

Peter

POSTED BY: Peter Parker
6 Replies

Hello sir ,

I saw your conversation and got much help thanks, but i am facing a similar problem, i want to fix an image in my codes. can you please help me do this. Here is my file in attachment. Thanks

Attachments:
POSTED BY: Kashif Nazar

Awesome, your solution is really nice. Thank you very much for your help!!! Also nice, that the solution is quite short and simple.

Cheers,

Peter

POSTED BY: Peter Parker

Sorry, I meant FileNames (notice the extra s)

POSTED BY: Sander Huisman

If I use

FindFile["1629500_001.tif"]

Mathematica finds the right path to this file. Therefore, I get there is sth. wrong with SetDirectory maybe???

Peter

POSTED BY: Peter Parker

Thank you Sander for your answer. I tried it:

 /c/portal/getImageAttachment?filename=screenshot.jpg&userId=381930

As you can see it does not really work. Have I done sth. wrong?

Peter

POSTED BY: Peter Parker

Try something like:

SetDirectory[NotebookDirectory[]];
fns=FileName["*00_001*"]
imgs=Import/@fns

Save the notebook in the same folder as the pictures!

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract