[Cl...] Posted July 2, 2020 Share Posted July 2, 2020 I'm using this to send the report to two folders. It works fine, but the file is being over-written each time. How can I make it append? filePath = "T:\DMR\CMM Data\100518 Op-120_Rev_A\"+ getRecordHead("planid")+ getRecordHead("partnbinc")+".txt" if fileExists(filePath) then // if it can't find the file then it will not error out. if Part_Type == "Set-up" copyFile(filePath,"T:\DMR\CMM Data\100518 Op-120_Rev_A_Set-up\theresults.txt") else endif if Part_Type == "Production" copyFile(filePath,"T:\DMR\CMM Data\100518 Op-120_Rev_A_Production\theresults.txt") endif //inquireList else message("could not find file : " + filePath) endif //fileExists Link to comment Share on other sites More sharing options...
[Er...] Posted July 2, 2020 Share Posted July 2, 2020 You need to parse the new file and add the content to the existing file. You will need readListFile() and addToFile(). Here is a small example for you to play with: if Part_Type == "Set-up" content=readListFile(filepath) for i = 1 to content.size addToFile("T:\DMR\CMM Data\100518 Op-120_Rev_A_Set-up\theresults.txt",getParameterNamed(content,i)) next i else..... or addToFile("T:\DMR\CMM Data\100518 Op-120_Rev_A_Set-up\theresults.txt",readListFile(filepath)) Link to comment Share on other sites More sharing options...
[Cl...] Posted July 2, 2020 Author Share Posted July 2, 2020 Thank you Eric. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in