Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a Windows command line tool to process text into fixed width paragraphs.

The source text file will just be a few pages of text in paragraphs.

I want to convert it to fixed width paragraphs, so that it still reads OK when the user opens it in Notepad without word wrap.

Any suggestions?

share|improve this question

You're looking for the *nix tool fold. It's availible in Cygwin, if you already have it, or UnxUtils, and probably some other ports I'm unaware of.

Usage like:

fold -4 file.txt

to fold into 4-character lines. (Outputs to Standard Output, so don't forget to redirect to another file :))

share|improve this answer

You must log in to answer this question.