Your best friend for file transfer.Fetch
Batch upload with permission-setting (4 posts)
- Started 10 years ago by kdjsmith
- Latest reply 10 years ago from Scott McGuire
Hi all. Hoping someone can point me in the right direction here. I work at the University at Buffalo, and we've used Fetch in our division for awhile. I'm pretty new here but was assigned a task: Our users don't typically remember to check and set permissions after they upload to our FTP server, and since it's a somewhat automated web site, mis-set permissions can screw things up until our webmaster goes in and cleans up.
I'm looking for a simple way to batch-upload some files, then go back and automatically set permissions, and I've seen reference here to some Automator actions that can do this - but I'm looknig for a one-step solution (hey, haven't been able to get the users "educated" in this amount of time...).
I saw an Automator action that acts like a drop box - drag-and-drop files to it and it automatically fires Fetch up and performs the transmission. I've seen a Fix Permissions action. My programming's so rusty that I've tinkered a bit but can't seem to combine them so's they work as I expect them to. I'm the Mac user in the office, and have a decent familiarity with OS X, but this is my first real Automator project, and I don't know it or AppleScript anywhere near as well as I'd like to. The webmaster doesn't know Mac at all, so all she can offer me is the absolute basics in the process.
This was my thought as to how it "should" work.
1. Get Selected Fetch Items
2. Upload Files
3. Set Fetch Item Permissions
If this base assumption is correct, do I just plug the FTP information into Upload Files, set permissions how I want them in Set Fetch Item Permissions, and save the workflow to Finder as an Application? (Does the "newbie" tattoo on my forehead show that much?)
Thanks in advance for any help you can offer.
Scott McGuire Administrator
Yes, Fetch's Automator actions should let you set up a one-step solution for this - in fact, our intent was that the Automator actions would make it easy to solve problems such as this.
And you've almost got it right - you don't want "Get Selected Fetch Items" as the first action. That gets a list of items already on the server, and you don't want to start with that, since you're trying to upload new files.
Perhaps you meant "Get Selected Finder Items," but you don't need that as a first action either; when you save the workflow as an application, the act of dragging and dropping files on to the application is equivalent to a Get Finder Items action.
Otherwise, what you said is correct - all you should need is an Upload Items action followed by Set Fetch Item Permissions action, configure them, and save the workflow as a application. Drag the files on the application, and that should be it.
One thing to be aware of: currently such a workflow will only set the permissions of the newly uploaded files, but not any newly uploaded folders, even if you check the "Set Folder Permissions" checkbox - do you need to set the permissions of both newly uploaded files and folders, or just files?
(This is because the Upload Files action only outputs a list of uploaded files, not the uploaded folders. We are debating changing this, and your feedback would be valuable. In other circumstances, such as when you use it on items already on a server, the Set Fetch Item Permissions action does apply to both files and folders.)
I hope this helps, and please let us know if you have other questions or run into problems.
Thanks for the quick reply, and the (now that I see it) obvious first mis-step. As far as I know, it's simply files that are getting updated. I'll play with Automator today and see if I can get it going.
Scott McGuire Administrator
Thanks for the feedback and again, let us know if you have more questions.
- Page 1