Get an Alias for a Path, if assigned

Evaluator provides the Resolve function to determine the path for an alias. I'm interested in going the opposite way, specifically with Evaluator if at all possible.

USE CASE: I have a button whose label is set to a truncated version of the active tab path.

I would like to include alias in the tooltip, if one exists for the active tab path.

Any ideas?

Tricky. I am afraid the Evaluator can't enumerate aliases. A function like Aliasify or a flag for Resolve() would definitely be a useful :+1:

1 Like

I agree with this feature request!

1 Like

We've added that for the next beta.

3 Likes

Trying to use Resolve with the "a" modifier ion paths that have an alias. I am not getting anywhere.

I've tried:

Output(Resolve("{sourcepath}",a);

and...

Output(Resolve("{sourcepath}","a");

I get this popup:

What am I missing?

I haven't installed the new beta yet as of tonight.
But I think you had it right in the first post.

Output( source ) ; works from a button as does Output( Resolve( source ));

I am testing it via a button and getting the result I posted earlier.

If you want to run raw evaluator code from a button you need to change the type of the function to Evaluator Function.

Use source rather than {sourcepath} in the evaluator.

 12/17/2025 9:14 PM Evaluator:  Error at line 1, position 23 [Evaluator Function: New Button]
Unknown value (6): a
Output(Resolve(source,a);
 12/17/2025 9:15 PM Evaluator:  Error at line 1, position 25 [Evaluator Function: New Button]
Unknown value (6): a
Output(Resolve({source},a);
 12/17/2025 9:16 PM Evaluator:  Error at line 1, position 27 [Evaluator Function: New Button]
Unknown value (6): a
Output(Resolve("{source}",a);
 12/17/2025 9:16 PM Evaluator:  Error at line 1, position 25 [Evaluator Function: New Button]
Unknown value (6): a
Output(Resolve("source",a);
 12/17/2025 9:19 PM Evaluator:  Error [Evaluator Function: New Button]
Scope mismatch (2)
Output(Resolve(source,"a");
 12/17/2025 9:20 PM Evaluator:  Error [Evaluator Function: New Button]
Scope mismatch (2)
Output(Resolve("source","a");
 12/17/2025 9:20 PM Evaluator:  Error [Evaluator Function: New Button]
Scope mismatch (2)
Output(Resolve("{source}","a");
 12/17/2025 9:21 PM Evaluator:  Error [Evaluator Function: New Button]
Scope mismatch (2)
Output(Resolve({source},"a");

It looks like you are missing the closing parenthesis for Output() in all of these.
I think that's what Scope mismatch is .

Dang it. Thanks for pointing that out. I will validate tomorrow.

I think you need to study the variable types of the evaluator. The parameter for Resolve() is a 'path' type path and an optional 'string' type flags.
source is already of type 'path', no quotes needed.

Output(TypeOf(source)) 
// output:path
Resolve(
     path:path,
     [string:flags]
)
→ path

Thanks to everyone for the assistance. Despite reviewing the documentation and searching these forums for examples, I missed at least four things:

  1. used {sourcepath} instead of source
  2. used a instead of "a"
  3. missed a space after source,
  4. missed the closed paren ) for Output

In other words, I got almost nothing right.

Having corrected all that...

... I am getting interesting results that don't track with expectations. Here are a few examples:

Folder Assigned Alias Expected Returned Alias Actual Returned Alias
C:\users\Chuck\Documents Docs /Docs /Default
C:\Users\Chuck\Documents\ Work Work /Work /Default/_Work
H:\Library - Software Soft /Soft H:\Library - Software
C:\Users\Chuck\Pictures Pics /Pics /hostpictures
H:\Library - Personal\School\Graduate School /School H:\Library - Personal\School\Graduate

What am I missing?

It appears that only built-in aliases are supported.

Not needed

and also didn’t look for the shortest alias.

It should match the deepest alias, I think. Not the shortest.

My bad, it's already the deepest :slightly_smiling_face:.

The built-in alias limitation is unfortunate. Request Resolve() be expanded to include user-created aliases.

User-created aliases will be supported in the next update.

1 Like