[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [StrongED] Re: Add at end of file?
In message <514b610e85Lists@xxxxxxxxxxxxxx>
"Richard Torrens (lists)" <Lists@xxxxxxxxxxxxxx> wrote:
> In article <6145b54951.old_coaster@old_coaster.yahoo.co.uk>,
> Tony Moore <old_coaster@xxxxxxxxxxx> wrote:
> > On 20 Aug 2010, "Richard Torrens (lists)" <Lists@xxxxxxxxxxxxxx> wrote:
>
> > > I have a large number of files to which I wish to add a line at the
> > > end of each.
> > >
> > > Is there a way to do this?
>
> > If you mean by using StrongED, I think the answer is not easily.
[snip]
> The addition to the file is very simple: a final line
>
> %CO:K,12,0%
>
> This adds column K - which is exactly what I need.
>
> Yes, there are other bits in the header section (e.g. defining window
> width) which are beyond the scope of this request.
>
> So I am looking for exactly what I asked - a way to append the same 'word'
> to the end of a collection of files.
The following should get pretty close to what you want to do:
- Create a new mode directory in StrED_cfg.UserPrefs.Modes
- Inside it create a ModeWhen file that will load all the target files
into this new mode. Eg if your files are in directory X then make a
rule: *, **.X.*
- Open a new StrongED window and enter the line (without quotes):
'OnLoad<tab>EndOfText InsertStr("%CO:K,12,0%") SaveText'
Save the file as 'ModeFile' in the new mode directory.
- Drag the files (or the directory they're in) to StrongED's iconbar
icon. They should all be loaded, altered and saved automatically.
Make sure you have a backup though as I only did the briefest of testing
on this. You may have to play around with the InsertStr command to get
exactly what you want.
Cheers,
Fred.
--
StrongED developer
http://www.stronged.iconbar.com/
--
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx