how to concatenate all open files into one new document?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Lawrence
Posts: 9
Joined: Wed Sep 01, 2004 3:32 pm
Location: Kansas City

how to concatenate all open files into one new document?

Post by Lawrence »

I've tried writing a macro to copy text from one document to another but macros do not seem to work across documents. I'm looking for a way to concatenate all open documents into one new document.

thanks
User avatar
boldan
Posts: 31
Joined: Tue Jul 22, 2003 2:47 pm
Location: Toronto
Contact:

Re: how to concatenate all open files into one new document?

Post by boldan »

Lawrence wrote:I'm looking for a way to concatenate all open documents into one new document.

thanks
I realize that this won't do it in Textpad, but you can concatenate several files just by using the COPY command in a DOS window. It even accepts wildcards.

Copies one or more files to another location.

COPY [/A | /B] source [/A | /B] [+ source [/A | /B] [+ ...]] [destination
[/A | /B]] [/V] [/N]

source Specifies the file or files to be copied.
/A Indicates an ASCII text file.
/B Indicates a binary file.
destination Specifies the directory and/or filename for the new file(s).
/V Verifies that new files are written correctly.
/N Uses short filename, if available, when copying a file with a
non-8dot3 name.
/Z Copies networked files in restartable mode.

To append files, specify a single file for destination, but multiple files
for source (using wildcards or file1+file2+file3 format).
Lawrence
Posts: 9
Joined: Wed Sep 01, 2004 3:32 pm
Location: Kansas City

Post by Lawrence »

Indeed I have always resorted to doing it that way or with a small VB application that accepts dropped files. Too bad macros can't operate on more than one window.

thanks
User avatar
helios
Posts: 716
Joined: Sun Mar 02, 2003 5:52 pm
Location: Helios Software Solutions
Contact:

Post by helios »

If the files are not open in TextPad, you can use the Insert Files option on the Edit menu to insert selected files into a new document.
Helios Software Solutions
Lawrence
Posts: 9
Joined: Wed Sep 01, 2004 3:32 pm
Location: Kansas City

Post by Lawrence »

That works great! It will certainly work for me.

thanks
pjdusza
Posts: 1
Joined: Thu Mar 18, 2010 3:25 pm

Post by pjdusza »

Is there a limit on the number of files for which this method will work?
Post Reply