You'd have to have some way to keep track of how many times the file had been processed, either a list of the files or a table to keep track of the last version's suffix. The way this is usually handled, instead of adding a file number to the end, is to add the date to the end of the file's name. This makes it much easier to later locate the exact copy you want.
To do this in code would be something like this
- TheDate = Month(Date) &"-" & Day(Date) & "-" & Year(Date)
-
TheFile = CompletePathAndFileName & TheDate & ".txt"
-
DoCmd.OutputTo acOutputTable, "YourTable/QueryName", acFormatTXT, TheFile, False, ""
-
Linq
;0)>