Page 1 of 1

unable to add value inside a text file

Posted: Tue Mar 16, 2004 5:35 am
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:

Posted: Tue Mar 16, 2004 5:51 am
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

OUTPUT FILENAME STATS

Posted: Fri Mar 26, 2004 6:52 pm
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

<<&>>