Combining Multiple Files Into One

Discussion in 'OT Technology' started by jsiu, Sep 9, 2004.

  1. jsiu

    jsiu New Member

    Joined:
    Dec 12, 2003
    Messages:
    761
    Likes Received:
    0
    I'm looking for a program that can combine multiple (500 to be exact) data files into one large one. For example, if "data1" looks like:

    0
    1
    2

    and "data2" looks like:

    3
    4
    5

    Then I want to combine them (in order) into one file, which we'll call "total", so that "total" looks like:

    0
    1
    2
    3
    4
    5

    Basically, I'm looking for a program like this: http://www.snapfiles.com/get/txtcollector.html

    But is capable of handling other types of files (.dat files to be more specific). Does anyone know of any such programs? Thanks in advance for your help.
     
  2. El Scorcho

    El Scorcho you're never anything I rely upon

    Joined:
    May 5, 2000
    Messages:
    4,273
    Likes Received:
    0
    Location:
    LA, So. Cal
    winzip/rar?
     
  3. El Scorcho

    El Scorcho you're never anything I rely upon

    Joined:
    May 5, 2000
    Messages:
    4,273
    Likes Received:
    0
    Location:
    LA, So. Cal
    or are you looking to combine whats in those files into one big one?
     
  4. jsiu

    jsiu New Member

    Joined:
    Dec 12, 2003
    Messages:
    761
    Likes Received:
    0
    Precisely.
     
  5. Keyzs

    Keyzs OT Supporter

    Joined:
    Nov 3, 2003
    Messages:
    814
    Likes Received:
    0
    Location:
    Charlotte, MI
    If your lucky enough to get the files in the correct order, or you don't care the order of the data.

    Assuming the files are text files, with the extension of .txt, and the only txt files in a folder. You can simply do 'copy *.txt newfile.txt'
     
  6. jsiu

    jsiu New Member

    Joined:
    Dec 12, 2003
    Messages:
    761
    Likes Received:
    0
    In my case, order does matter (a lot). And they're not .txt files, they're .dat files, which can be properly viewed with Notepad.
     
  7. Keyzs

    Keyzs OT Supporter

    Joined:
    Nov 3, 2003
    Messages:
    814
    Likes Received:
    0
    Location:
    Charlotte, MI
    Just change the .txt to .dat. Copy *.dat newfile.dat

    If the file names are in order by name it should work.
     
  8. jsiu

    jsiu New Member

    Joined:
    Dec 12, 2003
    Messages:
    761
    Likes Received:
    0
    Where would I enter that command?
     
  9. Keyzs

    Keyzs OT Supporter

    Joined:
    Nov 3, 2003
    Messages:
    814
    Likes Received:
    0
    Location:
    Charlotte, MI
    To make the explanation simple, copy the files you want to merge to a directory on the root of C: named WORK. Click Start, Run and type CMD (or command if using 98). Type CD \
    Type CD WORK
    Type copy *.dat newfile.dat
    Type Exit

    And you should be able to open newfile.dat in notepad
     
  10. jsiu

    jsiu New Member

    Joined:
    Dec 12, 2003
    Messages:
    761
    Likes Received:
    0
    Worked perfectly. Thanks a bunch!
     

Share This Page