• 0

Copying a single file to multiple directories


Question

Hello,

Does anyone know of a simple way of copying a single file to multiple directories.

Example;

File.Ext to Folder1,Folder2,Folder3 and so on

These folders are sub directories of a main folder if that helps.

I would do it manually but there are a lot of sub directories.

11 answers to this question

Recommended Posts

  • 0

use a directory lister to list out the sub directories, and then turn the list into a .bat file

i.e.

copy c:\file.ext "d:\directory1\sub directory1"

copy c:\file.ext "d:\directory1\sub directory2"

etc

quotes only needed if there is a space in the path

  • 0
I can not even work out what your on about let alone how it works, could you make more clear?

Use this to make a list of the sub directories you want to copy the file into. like this

c:\Documents and Settings\woody\Desktop\New Folder\

c:\Documents and Settings\woody\Desktop\New Folder\Copy (2) of New Folder\

c:\Documents and Settings\woody\Desktop\New Folder\Copy (3) of New Folder\

c:\Documents and Settings\woody\Desktop\New Folder\Copy (4) of New Folder\

c:\Documents and Settings\woody\Desktop\New Folder\Copy of New Folder\

c:\Documents and Settings\woody\Desktop\New Folder\New Folder\

then open the resulting file in a text editor and using find/replace to turn it into this

copy c:\file.ext "c:\Documents and Settings\woody\Desktop\New Folder\"

copy c:\file.ext "c:\Documents and Settings\woody\Desktop\New Folder\Copy (2) of New Folder\"

copy c:\file.ext "c:\Documents and Settings\woody\Desktop\New Folder\Copy (3) of New Folder\"

copy c:\file.ext "c:\Documents and Settings\woody\Desktop\New Folder\Copy (4) of New Folder\"

copy c:\file.ext "c:\Documents and Settings\woody\Desktop\New Folder\Copy of New Folder\"

copy c:\file.ext "c:\Documents and Settings\woody\Desktop\New Folder\New Folder\"

The quotes are only needed if the path has a space in it.

If you want, make a list of the directories you need to copy it into and send it to me with the path to the file you want copying (inc file name) and I will try to sort it for you.

  • 0

I don't know if you are talking to me or not.

Create a folder. Right-click that folder and drop it into one of your drives, C:, for example. Now this shortcut is pointing there.

Now take the shortcut you just created and right-click it and drag it to another drive., D:, for example.

Whatever you put in that main folder, it will now be in both folders on both drives. I realize these are only shortcuts, but besides getting a batch file list or manually copying them I don't know how. You can synchronize them?

Hope it helps, sorry if it doesn't.

  • 0

I have to ask -- why in the world would you need to copy a file to multiple directories? That are sub folders no less, I am drawing a blank on why anyone would want to do this.

Most people are looking for ways to remove duplicates -- your trying to create them.. Could you explain why you need some file in every directory -- Im drawing a blank on the purpose of doing such a thing.

  • 0
I have to ask -- why in the world would you need to copy a file to multiple directories? That are sub folders no less, I am drawing a blank on why anyone would want to do this.

Most people are looking for ways to remove duplicates -- your trying to create them.. Could you explain why you need some file in every directory -- Im drawing a blank on the purpose of doing such a thing.

I'm not sure about the OP but in my case I was placing index.php files in multiple directory's for a script which makes directory browsing look pretty, and when you have a ton of midi files all sorted by artist then album something like this sure comes in handy.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.