Re: My first question to the group . . .
- "cosmyah" wrote:
>Sure. Please define any unique characteristics of this "certain point" that consistently apply to all files in your target directory. This could determine whether there is a need to open each file in sequence prior to ^!Replace and ^!Save, or e.g. if ^$StrReplace()$ done on ^$GetFileText$ from each file followed by ^!TextToFile would suffice. Also, how are the file names structured and what part of them you'd like to capture?
> ... is:
> How can I use a Find/Replace operation to insert a filename (or better, the first n characters of a filename) into that same file?
> That is, I want to open a (html) file, go to a certain point, insert the file's name (or part of it) and then go on to the next file in that directory and do it all over again (using a new filename, of course). I have 600 files to process, and doing it manually is not feasible.
> I know how to do a "global" Find/Replace over all these files, but I need a token of some kind to insert the filename.
> Or a clip to do the same, operating over all 600 files.
> Can this be done?
BTW, for cycling through a directory of files (capturing their names) check out (in Help on Clip Programming) the handy functions ^$GetFileFirst()$ + ^$GetFileNext()$ and/or $^$GetFiles()$.
- Thanks for the swift reply, diodeom.
You gave me some good leads on what to try. and if I hadn't studied regex a
little more, and found a workable solution on my own, I would sure try them.
Next time I will be sure to show a more complete example of what I am trying
to accomplish -- I can see how that would lead to an answer faster.
[Non-text portions of this message have been removed]