Jump to content

Help with workflow to create new file from clipboard


Recommended Posts

I have set up a simple workflow to create a new file from the clipboard into the frontmost finder item, but somehow it appends "?" sign in front of the file name.

 

When I output LARGE TYPE,  there is no "?" sign prepended, but when I write something it is prepended.

 

How this can be fixed?

 

I have shared workflow in Github: https://github.com/bhishanpdl/Shared/blob/master/Alfred_questions/New File from Clipboard.alfredworkflow?raw=true

 

I am using Write Text File Aflred object with file path as {query}.

Link to comment

It has to do with the output of the Run Script not being sanitised. Add a Transform Utility to Trim Whitespace between the Run Script and the Arg and Vars, and it’ll work.


But the Workflow is more complex than it needs to be. Some easy quick improvements: in the first Arg and Vars, get rid of the {query} in Argument; it’s not doing anything. Delete the second Arg and Vars and set {query}{var:FILENAME} in the Filename section of the Write Text File.

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...