3

I have a text file that contains a massive amount of words that I would like to make into a number of different text files. Specifically I need to take every 100 words in this file and make a separate text file. So, for example, my existing file has 5000 words. This would create 50 files with 100 words each in them. Is this possible with notepad++?

2
  • @QuickishFM Thanks for the reply. I didnt realize this was such a common question. I am using windows 10 but I have ubuntu 18.04 loaded on another HDD that I can boot to with a computer reset. Thanks for the link. I have been researching. Commented Jan 29, 2019 at 17:45
  • “I have ubuntu 18.04 loaded on another HDD that I can boot to with a computer reset.” -- Do not forget that you can also run Ubuntu under WSL in Windows 10. Windows drives are mounted under /mnt by default, C: as /mnt/c and so on. Commented Oct 25, 2019 at 10:10

3 Answers 3

3

you can use Gsplit, as alternative

https://www.gdgsoft.com/gsplit

Gsplit -> Other Properties -> SELECT - "Do not Add Gtsplit tags to pieces"

Go to Express Button:

1. Split this file: put the file path (ex. D:\Test\file.txt )

2. Copy this pieces to: put the place where you want to put your new files. AFTER you have converted, you must rename the new disk.gsd files to .txt.

Size of each pieces: add 2 more zeros: 5000000 (this means 5 mb)

IF the message appears "Warning: do you realy want to switch the pieces to 5000000 GB?" you must click OK

2
  • 1
    Explaining HOW to use GSplit will make this an answer. Right now this is only a comment. Commented May 7, 2023 at 18:35
  • 1
    I just edit the answer
    – Just Me
    Commented May 7, 2023 at 19:15
2

This can easily be done in Linux with a variety of tools, split being one. I'm assuming you are using Windows however, as you mentioned Notepad++. I don't think theres native Windows tools for it, but you can simply google the problem and find many solutions for it online. This is a common problem and there exist a variety of ways to solve it. Here is an example of one that may work, though not fully automated: https://notepad-plus-plus.org/community/topic/12370/splitting-or-breaking-one-file-into-multiple-smaller-ones. I suggest you research this further and then come back with a specific question on a method, due to how common this question is.

0

As for A BETTER AND QUICK ALTERNATIVE to split txt files, you can use git-bash

  1. Open git-bash in the folder you have the .txt files

  2. (Right click inside the folder -> Git Bash Here) and Use this commands:

cat *.txt | split -b 1m (split all files into a maximum of 1mb)

cat *.txt | split -b 500k (split all files into a maximum of 500kb)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .