Jump to content



Photo

Copying a single file to multiple directories


  • Please log in to reply
11 replies to this topic

#1 Enigma776

Enigma776

    Cenobite

  • Joined: 15-April 04
  • Location: Peterborough

Posted 23 August 2008 - 19:36

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.


#2 darkmanx21

darkmanx21

    It is what it is...

  • Joined: 29-June 07
  • Location: Houston, TX

Posted 23 August 2008 - 19:41

Create a shortcut on each drive to link to a main shortcut. Will this not work? I do it for my music and works like a charm.

#3 metallithrax

metallithrax

    I saw you earlier, with the hairy stick....

  • Tech Issues Solved: 2
  • Joined: 24-May 04
  • Location: Wherever I am at his moment in time.
  • OS: Windows 8
  • Phone: Sony Xperia U (android 4.0.4)

Posted 23 August 2008 - 19:46

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

#4 OP Enigma776

Enigma776

    Cenobite

  • Joined: 15-April 04
  • Location: Peterborough

Posted 23 August 2008 - 19:46

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

#5 metallithrax

metallithrax

    I saw you earlier, with the hairy stick....

  • Tech Issues Solved: 2
  • Joined: 24-May 04
  • Location: Wherever I am at his moment in time.
  • OS: Windows 8
  • Phone: Sony Xperia U (android 4.0.4)

Posted 23 August 2008 - 19:56

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.

#6 darkmanx21

darkmanx21

    It is what it is...

  • Joined: 29-June 07
  • Location: Houston, TX

Posted 23 August 2008 - 20:01

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.

#7 OP Enigma776

Enigma776

    Cenobite

  • Joined: 15-April 04
  • Location: Peterborough

Posted 23 August 2008 - 20:04

Yea I know how batch files work but I would hoping for a simple solution with out the need for them.

Darkmanx you idea will only work if your starting a new sync not for one that is already built

#8 SONiKz

SONiKz

    Neowinian

  • Joined: 12-October 05

Posted 23 August 2008 - 20:05

Removed, by the time I typed it someone else had already :-S

#9 Mrs_Angel_D

Mrs_Angel_D

    Do or Do Not, there is no try....

  • Joined: 10-March 08
  • Location: Everett, WA

Posted 23 August 2008 - 20:09

Fileboss isn't free but it does do exactly what your asking you might wanna check it out....

#10 OP Enigma776

Enigma776

    Cenobite

  • Joined: 15-April 04
  • Location: Peterborough

Posted 23 August 2008 - 20:20

Fileboss dis the trick, luckily it has a trial which was not limited :)

Thank you so much.

#11 +BudMan

BudMan

    Neowinian Senior

  • Tech Issues Solved: 100
  • Joined: 04-July 02
  • Location: Schaumburg, IL
  • OS: Win7, Vista, 2k3, 2k8, XP, Linux, FreeBSD, OSX, etc. etc.

Posted 23 August 2008 - 21:37

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.

#12 Mrs_Angel_D

Mrs_Angel_D

    Do or Do Not, there is no try....

  • Joined: 10-March 08
  • Location: Everett, WA

Posted 01 September 2008 - 20:39

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.