Long to Short - I have a stat tracker I've built for a keypad, this records key presses for different actions and logs them across different days into txt files per day.
I need to compile all these .txt files into a 'Total Actions Made'.
Code: Select all
Finalcount = \\ip-fs04\Studio\Documents\Studio Keypad\Studio Support Tool Dev\Reports\Stats\Emails\FinalCount.txt
Loop, \\ip-fs04\Studio\Documents\Studio Keypad\Studio Support Tool Dev\Reports\Stats\Emails\*.txt
{
FileReadline, Digit, %A_LoopFileFullPath%, 1
if not ErrorLevel
{
FileAppend, %Digit%`n, %FinalCount%
}
else
Msgbox, File Not Found
}
Example FinalCount.txt
1565 Files Approved
2522 Files Approved
5532 Files Approved
1565 Files Approved
(This is only pulling text from one line at the moment).
I need to strip back all the text present, and add together all numbers into 1 final digit - then either display it in a MSGBOX or create a new text file with that digit.
Can anyone help?
Thank you so much!