Add text at the end of each file

General questions about using TextPad

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

Post Reply
Ed
Posts: 103
Joined: Tue Mar 04, 2003 9:09 am
Location: Devon, UK

Add text at the end of each file

Post by Ed »

I have loads of text files that I want to add the following text to at the end of the file:-

!*************************************************************
! $Log: $ \verbatim
!
! \endverbatim
!*************************************************************

Is there a way to find "end-of-file" in either TextPad or WildEdit?
bveldkamp

Post by bveldkamp »

The easiest way IMO would be to do this in batch: put the text you want to append in a separate file, say "footer" then from a DOS prompt run something like this:

Code: Select all

for %f in (*.txt) do type C:\some\other\path\footer >> %f
(Make sure you type two greater-than signs, or you'll overwrite the original files)
Ed
Posts: 103
Joined: Tue Mar 04, 2003 9:09 am
Location: Devon, UK

Post by Ed »

Of course! Many thanks. I was pretty sure I'd done this before but this time I failed to employ "lateral thinking".

Maybe this could be an enhancement to TP?
Post Reply