Check if footage is in root project folder

I would like to run an automation on footage that is in the root folder of the project, but ignore any footage that is already in a sub folder. I’ve tried running a loop that checks if the parent folder is equal to null and that doesn’t seem to work. I’ve also tried the opposite to no avail. Is this possible?

Thanks in advance!

You can do it like this.
Just replace the message line with the action that you want to perform on the files in the root folder.

Thank you, that was super helpful!