nirsh Posted March 31, 2013 Share Posted March 31, 2013 Not sure if an extension already exists for Alfred to do this, if it does please let me know. I'd love to be able to mark one or more files, type "hide" and make them invisible in the finder. Link to comment Share on other sites More sharing options...
Boarder24 Posted March 31, 2013 Share Posted March 31, 2013 If all you are trying to do is make the file invisible, then simply adding a "." to the beginning will do that. I'm not really sure how to rename a file with a script. But that should point you in the right direction. Link to comment Share on other sites More sharing options...
nirsh Posted April 1, 2013 Author Share Posted April 1, 2013 I know that. There are some commands that can do that, but what i wanted is to avoid the scary terminal. Link to comment Share on other sites More sharing options...
Boarder24 Posted April 1, 2013 Share Posted April 1, 2013 Are they just terminal commands to show hidden files and hide them in the finder? Either way, please share! Link to comment Share on other sites More sharing options...
nirsh Posted April 1, 2013 Author Share Posted April 1, 2013 (edited) These commands are to hide/unhide files, and not to show hidden files: chflags hidden [PATH TO FILE/DRAG FILE HERE] chflags nohidden [PATH TO FILE/DRAG FILE HERE] In fact it is quite simple to hide a file, but for me personally it's not comfortable to enter each time the terminal and I would prefer an alfred workflow. Edited April 1, 2013 by nirsh Link to comment Share on other sites More sharing options...
jdfwarrior Posted April 1, 2013 Share Posted April 1, 2013 These commands are to hide/unhide files, and not to show hidden files: In fact it is quite simple to hide a file, but for me personally it's not comfortable to enter each time the terminal and I would prefer an alfred workflow. Yeah I was going to chime in and say that chflags would perform this. To create this as a workflow, simply create a new workflow, add a Trigger->File Action, and an Action->Run Script. Set the keyword for the file action, attach it to the Run Script and in the script area of the Run Script module, enter: chflags hidden "{query}" Also, untick the option to escape spaces. That should get you going. Link to comment Share on other sites More sharing options...
Boarder24 Posted April 1, 2013 Share Posted April 1, 2013 The only problem then would be to unhide files. Since Alfred doesn't show them. Also, if you use a search script, you might be able to have Alfred show you all files on your computer, and narrow down the file you want, by typing. Link to comment Share on other sites More sharing options...
nirsh Posted April 1, 2013 Author Share Posted April 1, 2013 (edited) The only problem then would be to unhide files. Since Alfred doesn't show them. Also, if you use a search script, you might be able to have Alfred show you all files on your computer, and narrow down the file you want, by typing. It's not a problem if you have another workflow that toggles the visibility of files, there are several of these. If you want i can upload the one i'm using (cause i can't remember where I found it) To create this as a workflow, simply create a new workflow, add a Trigger->File Action, and an Action->Run Script. Set the keyword for the file action, attach it to the Run Script and in the script area of the Run Script module, enter: chflags hidden "{query}" Also, untick the option to escape spaces. That should get you going. I hope I'm not asking too much, but since I have no experience in creating workflows nor scrips, there is a chances are you help me with this? I think you should also add the nohidden command to the workflow, This is how it will be perfect toggle. Edited April 1, 2013 by nirsh Link to comment Share on other sites More sharing options...
Boarder24 Posted April 1, 2013 Share Posted April 1, 2013 I will play around with the commands later. Do you want a file action or a keyword input? In the meantime, go ahead and try compiling the workflow yourself. That's how I got stated, a lot if trying an troubleshooting. Link to comment Share on other sites More sharing options...
jdfwarrior Posted April 1, 2013 Share Posted April 1, 2013 It's not a problem if you have another workflow that toggles the visibility of files, there are several of these. If you want i can upload the one i'm using (cause i can't remember where I found it) I hope I'm not asking too much, but since I have no experience in creating workflows nor scrips, there is a chances are you help me with this? I think you should also add the nohidden command to the workflow, This is how it will be perfect toggle. You do understand that, once you mark this file as hidden, it will no longer show up in Alfred results correct? So there won't be an option to go back and mark it as nohidden. That would have to be done via the terminal, or, you may be able to make a filter to show the hidden files. The down side to that is, they would may have to be in specified folders because it appears that, changing that flag simply marks them as a system file. If you made a filter to show system files, you would get a lot of results. Link to comment Share on other sites More sharing options...
nirsh Posted April 1, 2013 Author Share Posted April 1, 2013 (edited) You do understand that, once you mark this file as hidden, it will no longer show up in Alfred results correct? So there won't be an option to go back and mark it as nohidden. That would have to be done via the terminal, or, you may be able to make a filter to show the hidden files. The down side to that is, they would may have to be in specified folders because it appears that, changing that flag simply marks them as a system file. If you made a filter to show system files, you would get a lot of results. I didn't mean do see them in alfred results but on finder himself, I will explain: *If I see a file(s) that i want to hide I can mark them and hit an alfred keyword (or even a hotkey) to make them hidden. *If I want to unhide a hidden file (than i know his there) I can: 1st - hit an alfred keyword to show all files (I am using one of those) 2nd - mark the file(s) I want to be visible again and use the nohidden command (with different keyword/hotkey) that I want to be in the workflow. I hope I made myself more clear Edited April 1, 2013 by nirsh Link to comment Share on other sites More sharing options...
jdfwarrior Posted April 1, 2013 Share Posted April 1, 2013 See if this is what you are looking for. Download Use it as a file action. Find a file in Alfred and action it, select Toggle Visibility. Link to comment Share on other sites More sharing options...
nirsh Posted April 1, 2013 Author Share Posted April 1, 2013 See if this is what you are looking for. Download Use it as a file action. Find a file in Alfred and action it, select Toggle Visibility. I'm sorry but i'm must be missing something cause i don't understand how the workflow works without a hotkey/keyword. What do you mean by "action it"? how? Link to comment Share on other sites More sharing options...
jdfwarrior Posted April 1, 2013 Share Posted April 1, 2013 I'm sorry but i'm must be missing something cause i don't understand how the workflow works without a hotkey/keyword. What do you mean by "action it"? how? Use the result actions. Find a file in Alfred, press the right arrow to see the list of result actions (actions available for that item). If you have a file selected in Finder, press Cmd+Opt+\ to be prompted with the same list of actions. Link to comment Share on other sites More sharing options...
nirsh Posted April 1, 2013 Author Share Posted April 1, 2013 Use the result actions. Find a file in Alfred, press the right arrow to see the list of result actions (actions available for that item). If you have a file selected in Finder, press Cmd+Opt+\ to be prompted with the same list of actions. Nice! Yes, more or less it's what i was looking for, except if it's possible to do it on some filed at the same time, that would make this workflow perfect Link to comment Share on other sites More sharing options...
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