JA_UK Posted August 11, 2021 Share Posted August 11, 2021 Hi all, I’m relatively new to Alfred and I’ve been mostly getting to grips with workflows so far. For the first time today I was looking to rename a file using Alfred…I assumed the option to do this would be there but I can’t see it so don’t think it is? A search of the forum has brought up some ‘rename file’ type workflows from as far back as 2013. I'm wondering if there is a definitive, modern, workflow (or any other technique) which can be used to rename files in Alfred, which you forum members would recommend trying out? I’d particularly be looking for something where automatically-determined variables (current year, current month etc) could automatically be inserted into the new filename. Thank you! Link to comment
vitor Posted August 12, 2021 Share Posted August 12, 2021 (edited) 13 hours ago, JA_UK said: I'm wondering if there is a definitive, modern, workflow What does this mean and why does it matter? In software, “modern” is mostly a buzzword; what you want is maintained. I’m the creator of one of those Workflows. I built it years ago and still use it, as do others. It continues to work without a hitch. If it stops working, I’ll fix it. If Alfred introduces a feature which would make sense to add to it, I will. But we’re talking about renaming files, there’s no magic or innovation to it. Try what exists. If you’re missing something specific, make a feature request. Edited August 12, 2021 by vitor Link to comment
JA_UK Posted August 12, 2021 Author Share Posted August 12, 2021 17 minutes ago, vitor said: what you want is maintained. You answered your own question…that’s what I meant…apols for the amateur terminology. Could you point me in the direction of your workflow, please? Seems to be what I’m looking for in that case. Link to comment
vitor Posted August 12, 2021 Share Posted August 12, 2021 2 minutes ago, JA_UK said: Could you point me in the direction of your workflow, please? Link to comment
deanishe Posted August 12, 2021 Share Posted August 12, 2021 12 hours ago, JA_UK said: I'm wondering if there is a definitive, modern, workflow (or any other technique) which can be used to rename files in Alfred This is a quintessential roll-your-own workflow, tbh. Renaming a file is a simple, fundamental operation. All the effort is in implementing the naming scheme, but everybody's got their own idea of what that should be. Link to comment
vitor Posted August 12, 2021 Share Posted August 12, 2021 6 minutes ago, deanishe said: This is a quintessential roll-your-own workflow, tbh. For us, no objection. But to make your own you do need a modicum of programming experience. The commands to rename are dead simple, but the potential pitfalls (not quoting paths; overwriting what exists) and details (what to do on collisions; show extensions or not) will stomp a novice. The potential for irreversible damage is big, so I wouldn’t recommend it as a learning Workflow. Link to comment
deanishe Posted August 12, 2021 Share Posted August 12, 2021 (edited) 29 minutes ago, vitor said: I wouldn’t recommend it as a learning Workflow Mmm. You are right that it’s easy to overwrite an existing file you didn't intend to, but it’s also pretty easy to ensure nothing gets overwritten (mv -i). And an important learning experience if you manage to lose something forever anyway 29 minutes ago, vitor said: what to do on collisions; show extensions or not These are additional features that are interesting and somewhat challenging to implement. Figuring out how to handle collisions like this: Some File.txt Some File 1.txt Some File 2.txt Some File 3.txt instead of like this: Some File.txt Some File 1.txt Some File 1 1.txt Some File 1 1 1.txt is a fun challenge. Edited August 12, 2021 by deanishe Link to comment
JA_UK Posted August 14, 2021 Author Share Posted August 14, 2021 On 8/12/2021 at 9:55 AM, deanishe said: This is a quintessential roll-your-own workflow, tbh. On 8/12/2021 at 10:10 AM, vitor said: But to make your own you do need a modicum of programming experience. On 8/12/2021 at 10:10 AM, vitor said: The potential for irreversible damage is big, so I wouldn’t recommend it as a learning Workflow. On 8/12/2021 at 10:38 AM, deanishe said: And an important learning experience if you manage to lose something forever anyway WIth all of this in mind, renaming a file should be a built-in feature of Alfred, surely? @vitor I will try your workflow, thanks. Link to comment
deanishe Posted August 14, 2021 Share Posted August 14, 2021 8 minutes ago, JA_UK said: WIth all of this in mind, renaming a file should be a built-in feature of Alfred, surely? What's wrong with Vítor's workflow? Link to comment
JA_UK Posted August 14, 2021 Author Share Posted August 14, 2021 3 minutes ago, deanishe said: What's wrong with Vítor's workflow? Nothing as far as I know (I don't think I said there was?). Link to comment
deanishe Posted August 14, 2021 Share Posted August 14, 2021 Just now, JA_UK said: Nothing as far as I know (I don't think I said there was?). Surely, that's heavily implied if you still think Alfred needs a rename feature, isn't it? Link to comment
vitor Posted August 14, 2021 Share Posted August 14, 2021 Just now, deanishe said: Surely, that's heavily implied if you still think Alfred needs a rename feature, isn't it? I read @JA_UK’s point as “Renaming seems to be a simple basic feature in the same group as moving and copying. If Alfred already supports those two, why doesn’t it also support the common feature of renaming, especially considering—as established above—that a bespoke implementation can be problematic?” Link to comment
JA_UK Posted August 14, 2021 Author Share Posted August 14, 2021 (edited) 5 hours ago, vitor said: I read @JA_UK’s point as “Renaming seems to be a simple basic feature in the same group as moving and copying. If Alfred already supports those two, why doesn’t it also support the common feature of renaming, especially considering—as established above—that a bespoke implementation can be problematic?” Exactly right. I'm grateful to those of you who create and share workflows, and show newbies like me the ropes. I've had some great help already with the putting together of workflows for specific things I've wanted to achieve within Alfred. I just feel that renaming a file should be a core feature of Alfred, and that as such relying on third-parties to provide such core functionality is a bit odd. As a powerpack purchaser I feel it's legitimate for me to expect Alfred to work properly (accepting, of course, that bugs in sofware are always going to occur), and that it would be fair for me to expect support from the developers if an issue cropped up. It's all a bit different if a third-party-provided workflow doesn't work as it should or if it were, for example, to hose my Mac. Hope this makes sense, as I do appreciate the time / effort which goes on in this forum. Edited August 14, 2021 by JA_UK Removed duplicate 'I' at start of paragraph Link to comment
deanishe Posted August 14, 2021 Share Posted August 14, 2021 5 hours ago, JA_UK said: As a powerpack purchaser I feel it's legitimate for me to expect Alfred to work properly (accepting, of course, that bugs in sofware are always going to occur), and that it would be fair for me to expect support from the developers if an issue cropped up. I agree, and understand where you're coming from. It's just that in this particular case, I don't think that really applies. It's such a simple task using APIs that have been stable for literally decades. You wouldn't be able to tell if the code were written yesterday or 20 years ago. It's the kind of workflow that will keep working perfectly literally as long as there's an Alfred to run it. Link to comment
JA_UK Posted August 15, 2021 Author Share Posted August 15, 2021 17 hours ago, deanishe said: I agree, and understand where you're coming from. It's just that in this particular case, I don't think that really applies. It's such a simple task using APIs that have been stable for literally decades. You wouldn't be able to tell if the code were written yesterday or 20 years ago. It's the kind of workflow that will keep working perfectly literally as long as there's an Alfred to run it. You know that, I (as an amateur / newbie) have no idea. 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