Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

batch copy of one file to multiple folders

How do you do this? Can it be done? Is there an ap that does this?

Thanks, cheers, Bob.

MacPro (2008), Mac OS X (10.6.3)

Posted on May 30, 2010 11:59 AM

Reply
Question marked as Best reply

Posted on May 30, 2010 6:28 PM

How about Applicaitons -> Automator
Get Specified Finder Item
Copy Finder Items
Copy Finder Items
Copy Finder Items
Copy Finder Items
etc....

Save-As application.

Now you can drag and drop a file (or files) onto the Automator application, and it will copy the file (or files) to each of the folders you specified in each of the "Copy Finder Items".

If you wish, you can attach this Automator Workflow to a Folder Action Item, so that when a file is dropped into a folder, the Automator workflow executes.
7 replies
Question marked as Best reply

May 30, 2010 6:28 PM in response to Songman

How about Applicaitons -> Automator
Get Specified Finder Item
Copy Finder Items
Copy Finder Items
Copy Finder Items
Copy Finder Items
etc....

Save-As application.

Now you can drag and drop a file (or files) onto the Automator application, and it will copy the file (or files) to each of the folders you specified in each of the "Copy Finder Items".

If you wish, you can attach this Automator Workflow to a Folder Action Item, so that when a file is dropped into a folder, the Automator workflow executes.

Jun 1, 2010 12:59 AM in response to BobHarris

Thanks a lot for the suggestion. However it does not solve the problem because it concern one specific audio file (blank) which is missing in hundreds of different folders with audio samples. What would solve the problem is if I could tell macosx to copy that one file recursively into a folder and all sub- and subsub- etc folders. Then I could put all sample folders into one folder and bingo 🙂

I'll have a look at the automator to see if I can do that.

Thanks again, cheers, Bob.

Jun 1, 2010 1:29 AM in response to Songman

Copy the following into the Applescript Editor:

_________________________


on open the_files
get the_files
repeat with a_file in the_files

tell application "Finder"
copy file a_file to folder "One" of folder "Desktop" of folder "USERNAME" of folder "Users" of startup disk
copy file a_file to folder "Two" of folder "Desktop" of folder "USERNAME" of folder "Users" of startup disk
copy file a_file to folder "Three" of folder "Desktop" of folder "USERNAME" of folder "Users" of startup disk
end tell

end repeat
end open

___________________

change USERNAME to your short user name. Save as an application.

To test, create folders on your desktop called 'One'. 'Two' and 'Three'. Select and drag a file or files to it and they will be copied to the folders. Obviously you will then amend the folder paths to suit your needs, and of course you can add as many folders as you like.

Jun 1, 2010 2:49 AM in response to Songman

one specific audio file (blank) which is missing in hundreds of different folders with audio samples. What would solve the problem is if I could tell macosx to copy that one file recursively into a folder and all sub- and subsub- etc folders.


You could try using commands in Terminal (in /Applications/Utilities). I came up with the following:

If there is a folder on your Desktop named "targetfolder" that contains any number of subfolders at various levels, and there is also a file on the Desktop whose name begins with "blank", then the following Terminal commands will copy the "blank" file recursively into targetfolder and all of its subfolders.
Copy-paste each line into the Terminal window, and type Return after each:

--------
cd ~/Desktop
find targetfolder -type d -exec cp blank* {} \;
----------

For safety, try this only on a copy of your real audio folder. You could drag that copy onto the Desktop and rename it "targetfolder" before trying this.

BobHarris - Would appreciate your thoughts first - does this look OK? I'm not very experienced in Unix.

Jun 1, 2010 9:19 AM in response to BobHarris

Thanks very much. I had tested it before posting, but wanted to be sure.

It sounded as if the name of the file to be added might really start with "blank", which is why I used that name in the command, and why I suggested renaming the working folder on the desktop literally as "targetfolder" at least temporarily, so as also to match the command. That would allow the command to be copy-pasted directly into Terminal without having to edit it.

batch copy of one file to multiple folders

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.