Move user selected files into user selected folders?

I’m an elementary school teacher who often has to put copies of the same file into each student’s folder (for example a spreadsheet template for them to complete). Dragging the file one by one to twenty folders gets tedious so I tried building an automator workflow to simplify this, but am not having success.

Here’s what I have:

  1. Ask for Finder Items (choose the file you want to copy to the student folders)

  2. Ask for Finder Items (choose the student folders where you want to copy this file)

  3. Move Finder Items

And that is where I am stuck… how do I tell it that I want to move what I selected in Step 1 into what I selected in Step 2?

Thanks a lot for any help you can give me.

David Clough
http://staffdev.henrico.k12.va.us/~cloughdh/

David:

That is a great Automator idea! Unfortunately, I agree with your analysis; it does not seem possible to make more than one choice per workflow (in your case, the file to be copied to multiple folders). Additionally, even using a variable, it does not seem possible to get the Copy Finder Items action to access more than one destination either.

So, how about this:

set dests to choose folder with multiple selections allowed
	repeat with a_drop in input
		repeat with a_dest in dests
			tell application "Finder" to copy file a_drop to folder a_dest
		end repeat
	end repeat

Paste this code into a single Run AppleScript action, and then choose Save As… Save it as a workflow for further reference, then save it again as an Application. Saving an Automator workflow as an Application automatically makes that application a droplet. Now, you can just drop a file (or a bunch of files) onto this droplet, and you will be prompted to choose Folders to receive the copied file(s). Use the Cmd button to choose all the folders you want, and when you click OK, the file(s) will be copied into the chosen folders.

If this works for you, and you are interested, I would be happy to help you set it up for a fixed set (or sets) of folders to automate the process even more. If you find this to be too slow, we can also speed it up using shell commands.

Good luck,

Craig! You are awesome!! Thanks for the fast reply :smiley: I just did it and it worked perfectly… not slow at all. It’s exactly what I wanted. This will save me a ton of time… I’m sending it on to the other teachers on my team as well. You have no idea how much we appreciate this. We’re going to send you a gift card or something!

David
http://staffdev.henrico.k12.va.us/~cloughdh/