1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Append a line to the end of multiple text files

Discussion in 'Black Hat SEO Tools' started by mullet, Aug 11, 2011.

  1. mullet

    mullet Junior Member

    Joined:
    Jun 21, 2011
    Messages:
    130
    Likes Received:
    26
    Hey guys.

    As the subject indicates, I am looking for a script/app that can do the following:

    1) Allow me to select multiple text files (or even better, the directory in which the text files are located)

    2) Set a phrase such as "this is the line that will appear at the end of all the text documents" which will be appended to each and every text file after a line break has been created.

    Here is an example:

    Text file before this script:

    If you cannot or do not wish to write your articles yourself, you can search different outsourcing companies to find a freelance writer to help you grow your business and your website. These freelancers will ghost write articles for you which means that you will own all copyrights to the material that is produced to do with what you want. Freelance writers have a talent for writing, however, they would rather make quick money off of writing for others, rather than taking the time to build a niche website that will need to be heavily marketed and promoted to begin earning revenue.

    Text file after the script has been run:

    If you cannot or do not wish to write your articles yourself, you can search different outsourcing companies to find a freelance writer to help you grow your business and your website. These freelancers will ghost write articles for you which means that you will own all copyrights to the material that is produced to do with what you want. Freelance writers have a talent for writing, however, they would rather make quick money off of writing for others, rather than taking the time to build a niche website that will need to be heavily marketed and promoted to begin earning revenue.

    this is the line that will appear at the end of all the text documents


    If you can be of any help I would appreciate it, I have searched high and low for something like this. I have about 180 text files to append a sentence to (at the bottom) per day and this will save me hours and hours of valuable time.

    Thanks
     
  2. EvilPlankton

    EvilPlankton Junior Member

    Joined:
    Jun 16, 2011
    Messages:
    108
    Likes Received:
    20
    Is the server running linux or windows with Cygwin? If so, it should be a pretty simple bash command:

    for file in *
    do
    cat last_line.txt >> $file
    done

    You can use a "find" command to locate the files as well.
     
  3. awsomnick1

    awsomnick1 BANNED BANNED

    Joined:
    Feb 8, 2010
    Messages:
    539
    Likes Received:
    154
    still having problems? PM me and i can help you!