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

Share this post

Link to post

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.

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...