How to? Pass output from ffind to another command in a BTM file

Feb 23, 2012
238
3
#1
Hi,
I'd like to run ffind in a BTM file in order to retrieve a specific line from a text file, and then I'd like to pass that line to another command. (Specifically, the text file contains a list of filenames and paths; ffind will extract the relevant line, based upon the input parameter to the BTM file, and then I'd like to pass that path+filename to the copy command, to copy the specified file to another location).
Does anyone have any sample BTM code that would demonstrate how to accomplish this task?
 
Feb 23, 2012
238
3
#2
Ah, I think I see now. The help file explains that I can use @CON: in order to direct piped output to a specific place on the command line. So, I can just write:
ffind /k /m /t%1 filepaths.txt | copy @CON: c:\destination
This does the trick.

Hi,
I'd like to run ffind in a BTM file in order to retrieve a specific line from a text file, and then I'd like to pass that line to another command. (Specifically, the text file contains a list of filenames and paths; ffind will extract the relevant line, based upon the input parameter to the BTM file, and then I'd like to pass that path+filename to the copy command, to copy the specified file to another location).
Does anyone have any sample BTM code that would demonstrate how to accomplish this task?
 
#3
Hi,
I'd like to run ffind in a BTM file in order to retrieve a specific line from a text file, and then I'd like to pass that line to another command. (Specifically, the text file contains a list of filenames and paths; ffind will extract the relevant line, based upon the input parameter to the BTM file, and then I'd like to pass that path+filename to the copy command, to copy the specified file to another location).
Does anyone have any sample BTM code that would demonstrate how to accomplish this task?
How about @EXECSTR[]?

Code:
COPY %@EXECSTR[FFIND /K /M /T%1 filepaths.txt] c:\destination