anyone use the functions bat lbat?

The functions bat and batl look DARN useful for batch operations. Last maintained by Geoff Dutton in 2004.

You can get it from here:
ftp://ftp.wavemetrics.net/IgorPro/User_Contributions/BatchStringUtilsDu…


I had to edit the following lines, turning pipes "|" to forward slashs to get the code to compile.

offset2= strlen(lst) | so that trailing separator is not needed

offset = strsearch(separator+tempLst,separator+item+separator,offset) | search for ";item;"

I am still trying to figure how to input arguments for this code, however.

For example, this command should subtract wave1 from all waves prefixed by corr_, but no cigar.

 bat(" at -= wave1", "corr_*")

Any suggestions? Does anyone else use this procedure?
calichem wrote:
The functions bat and batl look DARN useful for batch operations. Last maintained by Geoff Dutton in 2004.

I am still trying to figure how to input arguments for this code, however.

For example, this command should subtract wave1 from all waves prefixed by corr_, but no cigar.

 bat(" at -= wave1", "corr_*")

Any suggestions? Does anyone else use this procedure?


I don't use this code and it looks pretty old (from the use of "|" for comments). The bat function seems to work for me. You should use the "@" symbol to indicate the place to substitute waves selected with wildcards. For example

 bat(" @ -= wave1", "corr_*")

When "at" is used as shown in the quote above, you should receive an error from Igor.

Also, as far as I can tell, you can safely eliminate the function GetStrFromListNOAH() by substituting calls to it with the built in function StringFromList(). For example in the function bat substitute

com = genCom("@", op, GetStrFromListNOAH(lst, inc, ";"))

with

com = genCom("@", op, StringFromList(inc, lst, ";"))