Page 1 of 1

Pairing Source file with its ReplaceList

Posted: Thu Jan 27, 2011 2:17 am
by alnico
I have pairs of files (Source and ReplaceList). I need to process these in pairs based on filename; where the ReplaceList file is run against the Source file.
If the ReplaceList filter filename could accept a macro, this would be a breeze; can it? or can you think of other solution?
I have about 50 file pairs that always change names...so hard coding this is not pretty.

Example:

File1.txt
File1-ReplaceList.tab
File2.txt
File2-ReplaceList.tab
File3.txt
File3-ReplaceList.tab
etc.

Thanks,
Brent

Re: Pairing Source file with its ReplaceList

Posted: Thu Jan 27, 2011 2:27 pm
by DataMystic Support
Hi Brent,

Just automate this using COM - then you can simply pass in the names to a function:

Code: Select all

var f1;

TPWindow.startFilters();
f1 = TPWindow.addReplaceListFilter( "File1-ReplaceList.tab", 4, false, false, false, false, false, true, false, false );
TPWindow.endFilters();
TPWindow.clearAllFiles();
TPWindow.addFile( "File1.txt", 0, 1 );