unable to add value inside a text file

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
pb

unable to add value inside a text file

Post by pb »

I am looking to add the file name into the file at the beginning of the file along with some special characters before and after the file name appended.
If the file name is abc.txt. and if abc.txt contains
abcd
efgh
ijkl
I would want the file to be having
<<abc.txt>>
abcd
efgh
ijkl
I was looking through text pipe to see if it does that, but I was unable to find a filter which does that..help please :cry:
Garren

Post by Garren »

I think you would just need to use the add header filter and type the following macro in the "using this text" field:

@inputFilename

See the exported filter below:


Filter List
-----------
Filter options
| [X] Log to file
| [X] Append to logfile
| Log filename: C:\BP\textpipe\install\textpipe.log
| Threshold 500
|
|--Input from file(s)
| [ ] Confirm before processing each file
| [ ] Confirm before processing read/only files
| [ ] Delete input files after processing
| Process binary files
|
|--Add header [<<@inputFilename>> ]
|
+--Output to file(s)
[ ] Only update date on changed files
[ ] Keep original file's date and time
[ ] Append mode
[ ] Change extension to: .txt
Backup mode

Files List
----------
C:\Documents and Settings\gwood\Desktop\New Text Document.txt
jring
Posts: 9
Joined: Tue Sep 23, 2003 3:13 am

OUTPUT FILENAME STATS

Post by jring »

You want to use the VB Script filter, "OUTPUT FILENAME STATS"

That will do exactly what you are asking...hmmm, you will need to change the string so that it includes the other values you mentioned

<<&>>
Post Reply