Finding file type in comp

I’m trying to label layers in a comp automatically based partly on the type of layer they are. (For instance, audio, video, Illustrator file, Photoshop file, etc). Is there a way to find the file type through the comp itself? Or do you have to go back to the project window to find that information out?


Hi @skimber, there are 2 crucial properties that is currently missing and will be added in the next update,
“has video” and “has audio”, these property can help label the layers more precisely and easily.

I want to give you a different solution that will work in the current version too,
you can check the file extension of the footage against a group of file extension texts that represent the group you are labeling, for example - video footage, I searched and copied this list of extensions from the after effects import panel that I think should be labeled as a video layer.


Now I want to check automatically if an item “file extension” property equal to one of the texts in this list instead of searching one by one using 33 “if” lines just for this label.

it can be done using the “contains text element” text variable property, this property will check if a text contains another text within it (read more in the tooltip).
the text variable have a property called “text element”, you have to set the “text element” to the extension of the file.

in the example I labeled 4 groups - audio, video, Illustrator file, Photoshop file.
Download here -
label layers.json (44.4 KB)

Please let me know if you have more questions.

This is amazing. Thank you so much! And looking forward to that update! :slight_smile:

1 Like