Welcome our webmaster and SEO forum
Please enjoy the forum, contribute what you can, and wind up the Moderators!
Results 1 to 2 of 2

Thread: A free text file joiner

  1. #1
    eitems4734 is offline Junior Member
    Join Date
    Feb 2010
    Location
    USA
    Posts
    26

    Default A free text file joiner

    what i am trying to do is join two text (.txt) files using a software but not sure where I can get one for free. So, please if anyone knowns a text joiner that joins multiple .txt files into one, post it here!

  2. #2
    craftygeek is offline Junior Member
    Join Date
    Jun 2010
    Location
    Norfolk, UK.
    Posts
    21

    Default

    Thats really quite easy to do with PHP.

    fopen will open a file:
    PHP Tutorials: Opening a file with fopen

    so something like this would join the 2 files together & create a 3rd new file:
    PHP Code:
    $txt_1 fopen("text_dir/file_1.txt""r");
    $txt_2 fopen("text_dir/file_2.txt""r");
    $new_txt $txt_1 $txt_2;
    fclose($txt_1);
    fclose($txt_2);

    $new_file fopen('file_path/new_text.txt''w') or die("can't open file");
    fwrite($new_file$new_txt);
    fclose($new_file); 
    I haven't tested this, but it should work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124