Importing new transactions
The import command detects just the new transactions in some input files, and adds them to the main journal.
This works with any of hledger's input formats. But it's especially useful with downloaded bank CSV files, which may contain records already seen in previous downloads. It means you don't have to be careful about downloading exact date ranges.
Using bank.csv from the previous step: the first time we run import, it detects the two transactions:
$ hledger import bank.csv
imported 2 new transactions from bank.csv
And if we run it again on the same file, those transactions are not re-imported.
$ hledger import bank.csv
no new transactions found in bank.csv
$ hledger aregister checking
2023-01-01 opening balances as:ba:savings, as:.. $1000.00 $1000.00
2023-02-01 GOODWORKS CORP in:salary $1000.00 $2000.00
2023-02-22 DEPOSIT in:unknown $50.00 $2050.00
2023-02-23 TRANSFER TO SAVINGS as:ba:savings $-10.00 $2040.00
See also: Tutorial: Import CSV data
(Part of hledger by example.)