Skip to main content
m1jackson
Inspiring
January 27, 2026
Question

Automation Blocks - if "file exists" = true

  • January 27, 2026
  • 1 reply
  • 10 views

I've got a weird one is not making any sense to me. I've tried all sort of combinations of "true/false", "checkboxes" and "null" logic blocks to solve the following, but nothing seems to work properly.

 

In the following section of blocks, I've got a variable (key location comp file) that is populated earlier in the script.

 

FileEqualsTrue.png

 

As you can see in the console when this script is run, there is a list of 2 files in the directory.

 

SelectCreateVersionedComp.png

Which "should" mean that "key location comp file" = true, and the custom input dialog with "select comp" should execute.

But, the script seems to passover the "if/do" and moves down to the "else if/do" where the "No Comp Currently exists" dialog is launched.

 

What am I doing incorrectly? I've tried inversing the logic with "does not equals" false and that seems to work "sometimes", but not always.

 

As always, any input you can give is appreciated.

1 reply

Mathias Moehl
Community Expert
Community Expert
January 27, 2026

The debug output looks like your variable "key location comp file" does not contain a single file, but a list with two files.

When you ask the "file exists" block if that file exists, it says "false" since there is no file whose path looks like this lists of two files. So make sure that the variable contains only a single file path, not a list.

 

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
m1jackson
m1jacksonAuthor
Inspiring
January 27, 2026
I'm trying to poll if ANY file exists (1 or many) so I can launch the
custom input dialog to select a file from the list in "key location comp
file".

How can I:
if
1. See if file(s) exist
2. Use that list as the variable in custom input.

else
1. No file(s) exists
2. Create the new comp using a template *(this part I've got working)*

I've had this working in the past, but something is amiss, thus my public
question.

Thanks.