You can also use a batch file to accomplish the task of moving the backup and 
log files. I have a batch file named "Start GNUcash.bat" that contains the 
following:

@ECHO OFF
ECHO Starting GNUcash
START "Starting GNUcash" /WAIT "C:\Program Files (x86)\gnucash\bin\gnucash.exe"
ECHO GNUcash closed
MOVE "C:\data file location\*.gnucash.*.gnucash" "C:\Backup file location"
MOVE "C:\data file location\*.log" "C:\Backup file location"
PAUSE
@ECHO ON
EXIT

The START command starts GNUcash and waits for it to close. Once it closes, it 
moves the backup and log files to the backup folder.  Obviously you would need 
to change the data file and backup file locations to suit your system. The file 
location spec does not need to be enclosed in quotes if there is no "White 
Space" in the file spec. Note that you cannot simply use "*.gnucash" for the 
backup file as that would move the main data file as well, so it must be 
"*.gnucash.*.gnucash".

Jack


-----Original Message-----
From: gnucash-user <gnucash-user-bounces+jelockard=outlook....@gnucash.org> On 
Behalf Of Glenn Fowler
Sent: Thursday, August 4, 2022 7:12 PM
To: GNC mailinglist <fly...@10g.pl>
Cc: gnucash-user@gnucash.org
Subject: Re: [GNC] Backup files in another folder – solution for Windows

Thank you for sharing.
I do my backups with PS as well but just do a once daily run and check the file 
hash for changes. If it's changed then copy.

On Thu, Aug 4, 2022 at 6:47 PM GNC mailinglist <fly...@10g.pl> wrote:

> Hi,    I&#39;m new to GnuCash but, yep, I was disappointed by the multiple
> backup and log files cluttering the directory where the main budget 
> file is stored. I&#39;ve searched and found out nobody even made a 
> workaround. So I wrote a Powershell (Windows) script watching folder 
> for new files and moving them to another folder. Take a look at →  
> github.com
> https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FKaligula0%2FFolderWatcher&amp;data=05%7C01%7C%7C10814a96c5234a88fdd908da766fffb6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637952520658959336%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=1zcfSLQK%2FBI%2FJM%2FzuATFplweHxp73T0VzqPdDuaN%2FxI%3D&amp;reserved=0
>   .  The file has an
> explanation but feel free to comment here or file a bug there.    Best
> regards, Char
> _______________________________________________
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.gnucash.org%2Fmailman%2Flistinfo%2Fgnucash-user&amp;data=05%7C01%7C%
> 7C10814a96c5234a88fdd908da766fffb6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%
> 7C1%7C0%7C637952520658959336%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
> DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;
> sdata=7kiTV0Ag43AFHk9sPXvDM8dxCH1yoFaO3okyHXzfDJg%3D&amp;reserved=0
> -----
> 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@gnucash.org
To update your subscription preferences or to unsubscribe:
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.gnucash.org%2Fmailman%2Flistinfo%2Fgnucash-user&amp;data=05%7C01%7C%7C10814a96c5234a88fdd908da766fffb6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637952520658959336%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=7kiTV0Ag43AFHk9sPXvDM8dxCH1yoFaO3okyHXzfDJg%3D&amp;reserved=0
-----
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@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to