I have made this script below:
start /w "" "C:\Program Files (x86)\CoolUtils\Total PDF Converter\PDFConverter.exe" "%userprofile%\Desktop\teste.oxps" "%userprofile%\Desktop\teste.txt"
del /f /s /q "%userprofile%\Desktop\teste.pdf"
findstr /v /r /c:"http" /c:"Banrisul" /c:"Sac" /c:":" /c:"-" /c:"SAC" /c:"OUVIDORIA" /c:"B A N R I S U L" /c:"+" "teste.txt" > "output.txt"
for /f "usebackq tokens=* delims=" %%a in ("output.txt") do (echo(%%a)>>output2.txt
move /y output2.txt output.txt
My output.txt
is that below which is summarized as real file is too large:
01 VERO BANRICOMPRAS A PRAZO 914709 77,56
VERO BANRICOMPRAS A PRAZO 914710 322,58
VERO BANRICOMPRAS A VISTA 256534 187,64
VERO BANRICOMPRAS A VISTA 256539 17,62
VERO CARTAO CREDITO 391534 146,22
VERO CARTAO CREDITO 391535 159,26
VERO CARTAO CREDITO 391536 543,16
VERO CARTAO CREDITO 391537 479,37
VERO CARTAO CREDITO 391538 96,00
REDECARD S.A CARTAO CREDITO 415856 217,25
REDECARD S.A CARTAO CREDITO 416552 152,28
VERO CARTAO DEBITO 338711 144,60
VERO CARTAO DEBITO 338712 378,03
VERO CARTAO DEBITO 338713 134,34
CIELO S/A CARTAO DEBITO 312125 57,71
CIELO S/A CARTAO DEBITO 312126 23,46
CIELO S/A CARTAO DEBITO 312127 232,55
RESGATE AUTOMATICO 000000 17.700,00
02 VERO BANRICOMPRAS A PRAZO 208538 396,99
VERO BANRICOMPRAS A PRAZO 208539 217,65
VERO BANRICOMPRAS A VISTA 562243 147,65
VERO CARTAO CREDITO 692285 105,58
VERO CARTAO CREDITO 692286 28,53
VERO CARTAO CREDITO 692287 561,48
VERO CARTAO CREDITO 692288 150,14
VERO CARTAO CREDITO 692289 101,78
CIELO S/A CARTAO CREDITO 673728 125,39
CIELO S/A CARTAO CREDITO 673729 25,36
REDECARD S.A CARTAO CREDITO 716879 278,83
REDECARD S.A CARTAO CREDITO 720069 47,78
VERO CARTAO DEBITO 637568 124,70
VERO CARTAO DEBITO 637569 272,15
VERO CARTAO DEBITO 637570 244,13
CIELO S/A CARTAO DEBITO 609977 100,13
03 VERO BANRICOMPRAS A PRAZO 501238 158,81
I'm stuck in how to sum the values of each same text, and then sum the total of all text summed. The middle data column and the initials 01
, 02
, etc. don't matter. Only the text and the last column should be used. It need be like that bellow:
VERO BANRICOMPRAS A PRAZO 20.596,26
VERO BANRICOMPRAS A VISTA 14.658,12
VERO CARTAO CREDITO 2.549,34
(etc.)
---------------------------------------------------
TOTAL OF ALL: 37.803,72
Just uploaded my full output.txt
in this link: https://ufile.io/uyxr1
About my output.txt
file: There are just spaces between the data columns, but the number of charachteres of the description and the numbers will always change. But what only matter for me is the description and the last column.
@Mofi, look how i expected:
------------ CARDS OF MONTH -----------
CIELO S/A CARTAO CREDITO 2.147,13
CIELO S/A CARTAO DEBITO 10.867,72
REDECARD S.A CARTAO CREDITO 11.835,11
REDECARD S.A CARTAO DEBITO 87,20
VERO BANRICOMPRAS A PRAZO 17.083,70
VERO BANRICOMPRAS A VISTA 7.829,06
VERO CARTAO CREDITO 58.052,05
VERO CARTAO DEBITO 17.215,64
----------------------------------------
TOTAL OF ALL: 125.117,61
----------------------------------------
RESGATE AUTOMATICO 152.900,00
PAGAMENTO DE FORNECEDOR 25.900,00
DOC-E 63.487,36