LEDGER_FILE environment variable

203 views
Skip to first unread message

dwebman

unread,
Mar 16, 2009, 10:31:05 AM3/16/09
to Ledger
HI,
I'm running ledger in DOS under Windows XP. I had previously set the
env var LEDGER to the path to my original set of books. It worked
fine and I did not have to specify the path using the -f switch when
running ledger queries. I have set up another set of books and
edited the LEDGER env var, rebooted, but the ledger command opens the
original set. I then renamed the env var to LEDGER_FILE t set the
path to the 2nd set of books, rebooted, and even ran the DOS command
"echo %ledger_file% to verify the new env var, but again when running
ledger without the -f switch I get the original books data.

Any idea where ledger is picking up this original path?

regards,
Dave

Omari Norman

unread,
Mar 16, 2009, 10:37:28 AM3/16/09
to ledge...@googlegroups.com

Try running Ledger the the '--no-cache' option and see if this fixes it.
If so, then you're picking up the cached data. It's just a file with a
cache, but I don't know where it would be on MS-DOS (on Unix by default
it's .ledger-cache in the home directory.) --Omari

--
Not labeled for individual retail sale.

Bill Harris

unread,
Mar 16, 2009, 9:10:33 PM3/16/09
to ledge...@googlegroups.com
dwebman <dwe...@telus.net> writes:

> Any idea where ledger is picking up this original path?

Sure. ~/.ledger-cache Until it's fixed, you may have to remove it when
you change files.

Bill
--
Bill Harris http://facilitatedsystems.com/weblog/
Facilitated Systems Everett, WA 98208 USA
http://facilitatedsystems.com/ phone: +1 425 337-5541

dwebman

unread,
Mar 18, 2009, 1:46:42 AM3/18/09
to Ledger
Thank you Bill and Omari for your generous help. I found the culprit
under Documents and Setting/<User> and it was named .ledger-cache.
Sure enough, the path to the original set of books was on the first
line, and even tho it had binary bits I did edit the path using
Textpad and ledger queried the new set of books. I fumble around
Windows, I prefer the command line of FreeBSD but I'm trying to create
some video tutorials of basic Ledger commands as part of a YouTube
series of videos I'm doing for basic accounting skills for young
entrepreneurs.

My son has started a new business and asked for help in keeping a set
of books. From my own youth, I remembered how bookkeeping and basic
accounting seemed the least important of my tasks when I too started a
small construction business. I'm trying to give him some basic tools
to keep what can become a critical business skill from interfering
with the immediate job of working in his business so that soon he'll
realize that working on his business is what will make it thrive - and
then his books will become pivotal.

But like many young people, his computer savvy is all GUI windows
based, so before I throw him into Unix or a variety thereof, I thought
I would wet his appetite with the power of what is seemingly such a
simple tool as ledger in a windows environment. The ledger itself is
easily created using TextPad which has enough of a windows feel to it
that he may not holler to loud when I get him on the DOS command line.

Anyway, I ramble. Thanks again you guys. The open source community
is such a beacon of light in a world of greed and parochialism.

Dave

On Mar 16, 6:10 pm, Bill Harris <bill_har...@facilitatedsystems.com>
wrote:
> dwebman <dweb...@telus.net> writes:
> > Any idea where ledger is picking up this original path?
>
> Sure.  ~/.ledger-cache  Until it's fixed, you may have to remove it when
> you change files.
>
> Bill
> --
> Bill Harris                      http://facilitatedsystems.com/weblog/
> Facilitated Systems                              Everett, WA 98208 USAhttp://facilitatedsystems.com/                 phone: +1 425 337-5541

IN RADIX

unread,
Aug 2, 2019, 11:23:49 AM8/2/19
to Ledger
Hello, how do you run ledger on XP, is it version 3.1.1 or 3.1.2? I can't run it on XP, please explain it to me. (sorry fe my bad English)
Reply all
Reply to author
Forward
0 new messages