In this video I am going to show you how to get all images in a folder, or really any file type that you need. It can be PDFs, CSVs, TXTs and so on. Basically any extension that you want to target you can get this way. Most people are looking for images but you can use it with anything.
The first thing you need to do is get all of the files in your target folder into a list.
From here there is a number of things you can do, first I’ll show you how to target one extension, then multiple and then another way as well.
To get one extension you can use the ends with function. This does require you to be subscribed to Ubot updates but don’t worry because I’ll show you another way in a minute.
The next way is to use a regular expression and this can target one or more extensions. You also do not have to be subscribed to Ubot updates for this one which is nice.
Finally, the last way is to use the File Management plugin and then to use the get extension function, from here you can check the extension using comparison or check it against an entire list of extensions if you want.
So that’s how you can get all of the files you want out of a folder and into a list. I hope you enjoyed the video, feel free to subscribe and I’ll see you in the next one.