[TUTORIAL] Easy merging lots of text files - one line of code....

 

Results 1 to 2 of 2
Guys I come across a lot of SEO 's who're working with masses of scraped ...
  1. #1
    jascoken's Avatar
    jascoken is offline ...Toolz Evangelist
    Join Date
    Nov 2010
    Location
    Sussex:UK
    Posts
    1,101
    Thanks
    114
    Thanked 713 Times in 353 Posts

    Lightbulb [TUTORIAL] Easy merging lots of text files - one line of code....

    Guys

    I come across a lot of SEO's who're working with masses of scraped URL lists etc. and need an easy way of combining them into one file for a mass import etc. Many people don't know much about DOS/CLI in windows, but this one line does the job...

    First... How to get into the command mode etc if you don't already know...

    Windows Key + R = 'Run' (or START:Run)

    Type 'CMD' & ENTER to get to the command prompt

    Type 'CD C:\Users\whoever\My Documents\blah\blah...' & ENTER to change to the directory where the files are stored. (Hint: If you're in windows explorer and you click on the folder icon top left, next to the windows path, it will become the actual full directory path which you can copy and paste. Paste it into the command box by using right-click and paste - CTRL V won't work.)

    Now 'DIR' & ENTER will show you the directory of files (so you can check etc.)


    Many of you will know all this so far.... So here's the important command to do the work:

    for %f in (*.txt) do type "%f" >> new.txt

    ...this quite simply loops and copies ('types') any text files (with extension '.txt'), one-by-one into another text file called 'new.txt'

    You can play with this with other plain-text file extensions obviously and change the end file name if you want!




  2. #2
    HatIsBlacked's Avatar
    HatIsBlacked is offline Regular Member
    Join Date
    Dec 2010
    Posts
    222
    Thanks
    6
    Thanked 52 Times in 31 Posts

    Default [TUTORIAL] Easy merging lots of text files - one line of code....

    your in the wrong forum. post this in the programming forum. this is for blackhat software tools, not how to do dos batch commands.

Similar Threads

  1. Batch video merging of thousands of files. Which software to use.
    By ThreadKiller in forum Video Production
    Replies: 7
    Last Post: 11-12-2012, 03:52 AM
  2. display random line from text file then delete line
    By specopkirbs in forum PHP & Perl
    Replies: 4
    Last Post: 02-25-2012, 03:26 PM
  3. Append a line to the end of multiple text files
    By mullet in forum Black Hat SEO Tools
    Replies: 2
    Last Post: 08-12-2011, 03:59 AM

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
  •  




BlackHatWorld on Twitter BlackHatWorld on FaceBook


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