How to copy a single file into more than 1000 subfolders?

Discussion in 'Programming' started by nikolaalx, Oct 27, 2006.

  1. #1
    Hi,
    I need a tip on how to copy a file into a group of folders with lots of subfolders.

    I am using windows xp.
     
    nikolaalx, Oct 27, 2006 IP
  2. WillB

    WillB Peon

    Messages:
    453
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    My tip would be to write some software to do it for you. Do you need to do it on a webserver? If so, such a script would be simple. If you want to do it on your home computer (without a webserver), it might be a bit harder unless you know languages like VB, C, C++, Delphi, Java etc.
     
    WillB, Oct 27, 2006 IP
  3. rb3m

    rb3m Peon

    Messages:
    192
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #3
    A scripting language will help you do that. Rebol is very simple and easy to use.
     
    rb3m, Oct 27, 2006 IP
  4. intoex

    intoex Peon

    Messages:
    414
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    My maniac way :)
    1. Get TotalCommander Filemanager (or other) with function to build a tree
    2. you will get file treeinfo.wc on disc c:
    3. edit it - all directories and subdirectories will be in format [path]
    4. in notepad use replace text function
    replace [ with copy filename "
    and replace ] with "
    5. after executing you will have something like
    copy filename "c:\directory\"
    copy filename "c:\directory\subfolder"
    and so on
    6. rename file with with bat extension and run it.

    It think idea is clear, if not, ask people, then will describe in details, I only got and idea .... :)

    ~Alex
     
    intoex, Nov 1, 2006 IP
  5. mariush

    mariush Peon

    Messages:
    562
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I've written a small application for you.

    http://www.helpedia.com/programming/downloads/vb/copyfiletofolders.zip

    Extract the files from the application, open Configuration.txt, type on the first line the path where your file is, on the second line the name of the file and on the rest of the lines, as many folders as you wish, where file will be copied.


    source code included, vb 6 .. don't want you to think it's a virus or something like that.
     
    mariush, Nov 3, 2006 IP
  6. jerseychump

    jerseychump Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If you have a DOS cmd.exe prompt, you can do :

    for /r c:\path\to\target\dir %i (.) do copy c:\path\to\source\file %i
     
    jerseychump, Nov 4, 2006 IP