I'm not used to Maxscript and I'm not entirely sure this is exactly what you wanted, but. old code I realized last night that the middle loop isn't needed and it's code could be moved to the first one so. new code
I'm trying to search through files but I can't manage to put file extension from pattern. here's my code:
fn FindAndReplace str fnd rpl = ( addpos = findString str fnd if (addpos != undefined) do (replace str addpos fnd.count rpl)
) fm = openFile "D:\\path\\00BCB111D67783\\1FA83D69D89B24_materials.txt" mode:"rt"
line_cnt =…