Is it a way to import file by file of a folder

Hi, I build an automation which works perfectly for 1 image

At the beginning of this automation I import the image as an item in my project, and at the end I delete the item (with a jsx script). So the automation is able to be called many times in a raw.

The point is that I would like to run this automation on 100 images. These 100 images are stored in the same folder. So I find a loop “files in external folder” I selected my folder but after that I would like to import the first image of the folder in my project as an item, how can I do that ? I didn’t find in the action, maybe Import MyImage, but after that dropdown is empty and doesn’t suggest “this file”

Thank you for reading

Hi @LucieDevGirl,
another user asked me similar question recently, but he wanted to import an image sequence so I modified my last answer to fit a simple import.

you almost got it right, you just had to pick “custom” and then “auto” in the last line after the “import” dropdown in line 4.

Besides, I also added the process of finding the new imported project item afterwards, I did this by deselecting all project items before importing a new file, and then searching the selected item in the project window, because we know it will be selected after importing it.

Download -
import all files.json (10.0 KB)
(you need to enable “run javascript code” in the automation advanced settings)

I know this process is a bit tricky and unintuitive, I will try to simplify it in the next update with new properties.
Please let me know if you have more questions,
Alon

Thank you very much :slight_smile: I will try this solution