[GNC] find AND REPLACE?

D sunfish62 at yahoo.com
Thu Apr 12 22:11:17 EDT 2018


To be more specific about item 2, Gnucash uses a random 32 character string to store account information in transactions, rather than an account name. This, of course, means that you can rename an account without breaking all the transactions that have used that account previously. The downside is that you can't simply read a transaction in the stored XML and ascertain which transactions are using a given account. 

That being said, if you were to determine the proper codes involved, a simple find and replace of the codes in the text file will change the references. As David C noted, though, if you break it somehow, you're on your own. Note that by default, Gnucash compressed your XML file, and that you have to expand it before it is readable in a text editor. There are explanations about this on the wiki, I believe. 

Oh, and should you choose to go this route, a backup taken before you mess with the file might be prudent.

David T

On April 12, 2018, at 11:11 PM, David Carlson <david.carlson.417 at gmail.com> wrote:

The simplest answer is:

1.  it is incredibly easy to break the file so that GnuCash cannot read it.

2.  A large part of the file is obfuscated by using tokens instead clear
text so cross references are really difficult to follow.

David C

On Thu, Apr 12, 2018 at 12:47 PM, Glenn Bordonada via gnucash-user <
gnucash-user at gnucash.org> wrote:

>  Pardon a naive question from a newbie.
> I noted that I can save my .gnucash file into .xml file which I can edit
> with a text editor or write text processing programs to extract the data in
> various ways.
> Can anybody tell me what are the pros and cons for such a change?
> Regards,Glenn
>
>     On Friday, April 13, 2018, 1:15:14 AM GMT+8, C M Reinehr <
> cmr at reinehr.net> wrote:
>
>  I'm still a novice at GnuCash but from previous discussions I do not
> believe that there is a global find and replace utility. But two ideas
> come to mind. If your file format is XML, isn't that a text file? If it
> is, you could use a text editor ('vi' if you're on Linux) to do a global
> search & replace. Or, if you are using SQLite, you could use the dump
> utility to create a text SQL file and, likewise, use a text editor. Then
> rebuild your GnuCash file from the edited SQL dump file.
>
> HTH!
>
> CMR
>
>
> On 04/09/2018 11:11 PM, Paul Costan wrote:
> > I am looking for the command(s) or work-around to accomplish what I
> > used to use in Quicken as Find and Replace.  Specifically, after
> > downloading multiple months of transactions from my credit union into
> > a simple checkbook ledger, I could use the Quicken "find" to select
> > all transactions with description "Safeway" and then select from them
> > to "replace" the category to "Groceries". I'm good in Gnucash up
> > through the Find part, can't figure out how to easily set the Account
> > without a lot of keystrokes. Didn't see anything in the
> > manual/help/faq.  Suggestions? Thanks.
> >
> > _______________________________________________
> > gnucash-user mailing list
> > gnucash-user at gnucash.org
> > To update your subscription preferences or to unsubscribe:
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > If you are using Nabble or Gmane, please see
> > https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> > -----
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
>
> --
> Linux distribution Debian 8 "Jessie"
> ----
> "We contend that for a nation to tax itself into prosperity is like a man
> standing in a bucket and trying to lift himself up by the handle."
> --Winston Churchill
> ------
>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
_______________________________________________
gnucash-user mailing list
gnucash-user at gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


More information about the gnucash-user mailing list