vitor Posted August 7, 2013 Share Posted August 7, 2013 Call nf followed by a file name (if no extension is given, .txt will be used) to make a new file. Calling nfo instead will open the files after creation. nd and ndo behave similarly, but for directories. Two important diferences: no extension is added, and subdirectories can be created with /. If a Finder or Path Finder window is the frontmost window, the new paths will be created there, otherwise they will be created on the Desktop. Use | to separate the names of multiple entries (surrounding spaces will be trimmed). Download | Source seanrwcrawford, komacforever, Craigers and 4 others 6 1 Link to comment
vitor Posted November 4, 2013 Author Share Posted November 4, 2013 Update. Support for multiple files and opening after creation. Link to comment
katie Posted December 17, 2013 Share Posted December 17, 2013 Thank you for this workflow! Is there a pre-defined list of file types that I can create? I'm wondering because I can use this with no problem for .txt and .doc/.docx files, but not for, for example, .rtf or .key files. Link to comment
vitor Posted December 17, 2013 Author Share Posted December 17, 2013 Thank you for this workflow! Is there a pre-defined list of file types that I can create? I'm wondering because I can use this with no problem for .txt and .doc/.docx files, but not for, for example, .rtf or .key files. Not currently, no, as they were not really part of the goal. I might do it in the future, but I doubt it, since there’s another workflow that already does that. Link to comment
katie Posted December 17, 2013 Share Posted December 17, 2013 Not currently, no, as they were not really part of the goal. I might do it in the future, but I doubt it, since there’s another workflow that already does that. Oh, sorry! I did search the forums but I didn't see that one. Thanks for pointing me in the right direction! Link to comment
vitor Posted October 4, 2016 Author Share Posted October 4, 2016 Update. It now uses features specific to Alfred 3. It also uses OneUpdater, so this should be the last time you need to manually update. Link to comment
vitor Posted April 11, 2017 Author Share Posted April 11, 2017 Update. New icon and some code improvements. To update, download the latest version (same URL) or wait a few days (15 or less) and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
vitor Posted March 3, 2018 Author Share Posted March 3, 2018 (edited) Update. Added Path Finder support. Thank you to xDevThomas for the initial code. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Edited March 3, 2018 by vitor cands 1 Link to comment
vitor Posted March 5, 2018 Author Share Posted March 5, 2018 Update. Use JXA instead of AppleScript. To update, download the latest version (same URL) or wait a few days and it’ll prompt you to on next usage, since it uses OneUpdater. Link to comment
nwebb Posted September 25, 2018 Share Posted September 25, 2018 (edited) Hi. Thanks for the workflow. Sounds like this workflow now supports more than just .txt - I wondered what they were? (the link you gave above, to the other Workflow that supported .rtf is now dead so hoping it should support that) I'm on a Mac - High Sierra & it seems I can only create .txt files. Each file appears to be created but I get an error when trying to open them (below are a list of those errors). I wasn't really expecting .pages files to be included, but I pages usually has no problem opening up .doc files. RTF - The document “ddd.rtf” could not be opened. DOC - “bbb.doc” can’t be opened right now. (Pages couldn't read the file) PAGES - “ccc.pages” is damaged and can’t be opened. Hope this is helpful. Edited September 25, 2018 by nwebb typo Link to comment
deanishe Posted September 25, 2018 Share Posted September 25, 2018 12 minutes ago, nwebb said: I'm on a Mac - High Sierra & it seems I can only create .txt files. Yes, that's right. I think you've misunderstood how the workflow/files work. All the workflow does is create an entirely empty (i.e. 0 bytes) file with the given name. That's a perfectly valid plain text file (or Markdown or CSV). But a completely empty file is not a valid Word or Pages document. (Both of those are actually zip files, not text.) RTF files are theoretically text files, but like HTML files, they are not valid if completely empty. Certain content is required. vitor 1 Link to comment
nwebb Posted September 25, 2018 Share Posted September 25, 2018 Hi deanishe, really appreciate the reply! Great explanation. Just have a few related questions if that's okay? 1. Above, Katie said she was able to create .doc and .docx files - from what you've said I'm guessing she was mistaken & probably, like me, she had created something that wasn't really a valid file? 2. So the options for your Workflow are .txt or .csv (anything else?) 3. There was the other extension you linked to a while ago - it claimed to allowed the creation of .rtf files in the same way as you allow creation of .txt files - and I'm wondering if it's been removed because it didn't work, or whether the creator was using a workaround of sorts? If it's the latter, any plans to add it in? Creating .rtf on the fly is actually all I was looking for - but at least now, thanks to your explanation I understand why it hasn't been easy to find such a workflow Link to comment
deanishe Posted September 25, 2018 Share Posted September 25, 2018 (edited) 5 minutes ago, nwebb said: Above, Katie said she was able to create .doc and .docx files Word will open a 0-byte .docx file, even thought it's not a real Word document. Pages won't. 5 minutes ago, nwebb said: So the options for your Workflow are .txt or .csv (anything else?) It's not my workflow. In theory, you can create any type of file that is allowed to be 0 bytes. Edited September 25, 2018 by deanishe vitor 1 Link to comment
nwebb Posted September 25, 2018 Share Posted September 25, 2018 Quote It's not my workflow. Doh! Ha ha, sorry, mind is half on something else! I made the assumption and didn't even check Quote Word will open a 0-byte .docx file, even thought it's not a real Word document. Pages won't. Ah, useful to know Thanks for the help! Link to comment
vitor Posted September 25, 2018 Author Share Posted September 25, 2018 3 hours ago, nwebb said: and I'm wondering if it's been removed because it didn't work The creator of that Workflows seems to no longer be active on GitHub, where they were hosting it. I doubt the removal had to do with the Workflow itself. 3 hours ago, nwebb said: or whether the creator was using a workaround of sorts? If I recall correctly, they had a blank file for each file type bundled with the Workflow, then just copied them over. 3 hours ago, nwebb said: If it's the latter, any plans to add it in? Not as of now. I’d consider it if there were more demand for it. 4 hours ago, nwebb said: Creating .rtf on the fly is actually all I was looking for Here’s a modified Workflow that does just that. Link to comment
shmulvad Posted November 25, 2018 Share Posted November 25, 2018 This workflow seems to not work for me anymore. Maybe it happened during the update to Mojave. Anyway, I was wondering if anyone knows of a nice workflow that accomplishes the same thing as this? Link to comment
vitor Posted November 26, 2018 Author Share Posted November 26, 2018 (edited) 14 hours ago, shmulvad said: This workflow seems to not work for me anymore. What does that exactly mean? You’ll need to provide further details for me to be able to help. Does it only work sometimes? Does it never work? Does it do something different than expected? Open the debugger, set the log output to “All Information”, do the action and post the output. What’s your exact Alfred version? What’s your exact macOS version? Edited November 26, 2018 by vitor Link to comment
shmulvad Posted November 26, 2018 Share Posted November 26, 2018 1 hour ago, vitor said: What does that exactly mean? You’ll need to provide further details for me to be able to help. Does it only work sometimes? Does it never work? Does it do something different than expected? Open the debugger, set the log output to “All Information”, do the action and post the output. What’s your exact Alfred version? What’s your exact macOS version? After first reinstalling the workflow and then restarting my Mac it now works again. I am (and was) using macOS 10.14.1 and Alfred v. 3.7. Sorry for not trying this out before commenting. Link to comment
robro Posted July 30, 2019 Share Posted July 30, 2019 Thanks for the workflow. Seems to have problems with umlauts in path, e.g. creating test12.txt in /töst/ : /toÌst/test12.txt: No such file or directory Link to comment
vitor Posted July 30, 2019 Author Share Posted July 30, 2019 5 hours ago, robro said: Seems to have problems with umlauts in path Fixed. cands 1 Link to comment
vitor Posted October 28, 2019 Author Share Posted October 28, 2019 (edited) Continuation of @psicologo The probable culprit is Catalina’s new security theatre features. Make sure you‘ve given Alfred all the permissions it needs. If it still doesn’t work after fixing permissions and a full machine reboot: open the debugger, set the log output to “All Information”, run the Workflow, and post the output. Edited October 28, 2019 by vitor Link to comment
mjp Posted April 11, 2021 Share Posted April 11, 2021 I noticed that this workflow does not create new files when the path contains a directory name containing a hash (#) sign. Link to comment
vitor Posted April 11, 2021 Author Share Posted April 11, 2021 23 minutes ago, mjp said: I noticed that this workflow does not create new files when the path contains a directory name containing a hash (#) sign. Nice catch. That’s fixed in the latest version (same URL). Welcome to the forums. Link to comment
mjp Posted April 11, 2021 Share Posted April 11, 2021 Wow, big thanks for the incredibly fast reply and fix. Confirming that it works now also with paths containing hash signs. Keep up the amazing work! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now