Pairing Source file with its ReplaceList

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

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

Pairing Source file with its ReplaceList

Postby alnico » Thu Jan 27, 2011 2:17 am

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: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Pairing Source file with its ReplaceList

Postby DataMystic Support » Thu Jan 27, 2011 2:27 pm

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 );
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 1 guest