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
unable to add value inside a text file
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
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
@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
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
<<&>>
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
<<&>>