Jump to content

How to modify the content in {query}

Recommended Posts

Based on a File Filter, I want to go to two locations with Terminal, within the same Workflow.


Let's say the file filter path result is: ~/my/folder.

  1. The first part of the workflow will simply go to cd {query} which navigates to ~/my/folder.
  2. In the next part of the workflow, I want to keep the last part of the query – "folder" – i.e. the "Display Name" in the File Filter, and interject it in the path ~/my/other/folder.

I guess there might be multiple ways to achieve this, and the way I've been trying to figure out has been to modify the query via string replacements, so that ~/my/ becomes ~/my/other/


I have also tried to understand upstream variables and if it's possible to get the "Display Name" in the File Filter and simply take that variable and paste it into the path ~/my/other/ so that it becomes ~/my/other/{var} i.e. ~/my/other/folder, but I haven't succeeded.


Appreciate any help with this since I've spent almost an hour now with no results!

Edited by winterflags
Link to comment

Hi @deanishe, thanks for your help!


I'm not sure if I'm quite getting how to do this in practice. Also, I'm not sure how to get the echo to work with the whole Terminal Command (it also does other stuff).


I've added some images just to make it more clear what I'm attempting:








Terminal Command:



(The last image is obviously not going to work with the echo, as it stands).

Edited by winterflags
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...