Jump to content

Check if selection is a folder

Recommended Posts

19 hours ago, Floating.Point said:

Just wondering if there's a better way to do this?


Checking for an extension isn’t reliable because files can be extensionless. @Stephen_C’s solution is clever and should work, but I’ll add proper checks for “Is File?” and “Is Folder?” for the next Automation Tasks release.


In the meantime, you can use a Run Script with default settings and code: [[ -d "${1}" ]] && echo -n 'true' || echo -n 'false'. That will be true if a folder and false if not.


Edited by vitor
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...