JScript: Line-Broken Text into a Single Line


After converting long text into PDF and then copying it from the PDF to Notepad, you may encounter unwanted line breaks. In such cases, I have created a script that can be useful.

Validation Environment

  • Windows XP

Script

I wrote it using JScript.

How to Use

First, place the text you want to concatenate into a file named in.txt. Please put in.txt in the same folder as the script. Next, create an empty text file called out.txt. Also, place this file in the same folder as the script.

Then, double-click the script. The contents of in.txt will be merged into one line and written to out.txt.

Background

The origin of this script was an attempt to concatenate SQL that appeared in a Microsoft Access error report but was broken across words and lines.