Pairing Source file with its ReplaceList

Get help with installation and running here.

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

Post Reply
alnico
Posts: 74
Joined: Fri Oct 12, 2007 11:57 pm

Pairing Source file with its ReplaceList

Post 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
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Pairing Source file with its ReplaceList

Post 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 );
Post Reply