Re: [GNC] How to move my Windows 10 2.6.17 to a new Windows, 10 machine?

2018-07-13 Thread Dick Gardner
Stan, thanks. With my small account it wasn't much of a problem to do it
all manually (once I knew where and what needed to be done!), but I'm sure
your batch file is a great tool for higher volume situations.

I do agree with everyone that help for 'just-a user' folks like me is
important.  I know enough to be dangerous, but fortunately (at least I
think) I  know it. For me, instructions that clearly explain how *and why*
give me the most confidence to go DIY.  I think before I would be
comfortable using somebody's (black-box to me) tool I'd want to have an
imprimatur from, like, GNUcash and more documentation.

Adrien's answer of using an established tool like Windows BU sounds easy
and reliable, but you have to tell me exactly what *are* the "relevant
file(s)"? -- I didn't think one 218kb file could possibly be big enough to
hold 7 years of transactions, customers, vendors, etc. and I was sure I
*had* to regedit the Preferences (I *knew* that was dangerous for me) --
that is until Dave explained it plain and simple and gave me the confidence.

Thanks again everybody.

Dick



On Thu, Jul 12, 2018 at 6:29 PM Stan Brown 
wrote:

> Dick, here is a batch file I use to save and restore my GnuCash settings
> and reports, for transferring them between machines.  You'd need to
> change my file names and paths to yours, but still it could save you
> some time.
>
> If you don't want to be elaborate as I am -- my batch files tend to be a
> bit over-engineered -- just look for the "reg" lines. Those are the ones
> that save or restore the settings and reports.
>
> > @set MYECHO=echo off
> > @%MYECHO
> > set RZIPNAME=_stanReports.zip
> > set GFILNAME=_stanSettings.reg
> > setlocal
> > set MYNAME=%@name[%0]
> > if "%1" ne "/?" .and. "%1" ne "-?" .and. "%1" ne "" goto 000_Start
> > echo off
> > echo.
> > echo %MYNAME: Save or restore GnuCash settings
> > echo.
> > echo options:
> > echo /q Quiet
> > echo /v Verbose
> > echo /purge Delete saved log files (used with "save" or "apply")
> > echo save   Save settings
> > echo apply  Apply saved settings
> > echo purge  Delete saved log files.
> > echo Just one of 'save', 'apply', 'purge' is required.
> > echo.
> > echo Settings are saved in %GFILNAME and %RZIPNAME, in the same
> > echo folder as the GnuCash accounting file.
> > quit
> >
> 
> > 2018-02-25  new program
> > 2018-03-21  Add the purge option.
> > 2018-03-31  With 'purge', suppress error message if there are no files
> ...
> > 2018-04-01  ... and also delete GnuCash files in %TEMP%.
> > 2018-04-18  Add /purge as an option, used with "save" or "apply".
> > 2018-05-05  Program didn't abort after an an unknown option.
> >
> > Copyright 2018 Stan Brown, Oak Road Systems
> http://oakroadsystems.com/
> >
> 
> > :000_Start
> >
> > :: Scan the options.
> > set ACTION=none
> > set PURGING=0
> > set VERBOSE=1
> > do while "%1" ne ""
> > iff %1 == save .or. %1 == apply .or. %1 == purge then
> > iff %ACTION ne none then
> > echo %MYNAME: Only one of 'save', 'apply', purge is allowed.
> > cancel
> > endiff
> > set ACTION=%@lower[%1]
> > elseiff %1 == /q then
> > set VERBOSE=0
> > elseiff %1 == /v then
> > set VERBOSE=2
> > elseiff %1 == /purge then
> > set PURGING=1
> > else
> > echo %MYNAME: Unknown option '%1'.
> > cancel 2
> > endiff
> > shift
> > enddo
> > iff %ACTION == none then
> > echo %MYNAME: You need one of 'save', 'apply', or 'purge'.
> > cancel
> > elseiff %VERBOSE == 2 then
> > echo %MYNAME: Plaanning to %ACTION the %@if[%ACTION ==
> purge,files,settings].
> > echo.
> > endiff
> >
> > :: Check existence of files and folders.
> > set GDIR=e:\sb\$\GnuCash
> > iff not isdir "%GDIR" then
> > echo %MYNAME: Financials folder '%GDIR' not found.
> > cancel
> > elseiff not exist "%GDIR\Stan.gnucash" then
> > echo %MYNAME: File Stan.gnucash not found in '%GDIR'.
> > cancel
> > endiff
> > set RDIR=%USERPROFILE\.gnucash
> > set RZIP=%GDIR\%RZIPNAME
> > set GKEY=HKCU\Software\GSettings\org\gnucash
> > set GFIL=%GDIR\%GFILNAME
> > iff %VERBOSE == 2 then
> > echo %MYNAME: Financial database is in folder '%GDIR'.
> > echo %MYNAME: GnuCash reports are in folder '%RDIR'.
> > echo %MYNAME: GnuCash reports are zipped in file '%RZIP'.
> > echo %MYNAME: GnuCash settings are in '%GKEY'.
> > echo %MYNAME: GnuCash settings are exported to file '%GFIL'.
> > echo.
> > endiff
> >
> > iff %ACTION == save then
> > if %PURGING == 1 gosub PurgeAction
> > iff not isdir "%RDIR" then
> > echo %MYNAME: Reports folder '%RDIR' not found.
> > cancel
> > endiff
> > pushd "%RDIR"
> > set ZIPOPT=
> > set OPTS=-r -T -o
> > if %VERBOSE lt 2 set 

Re: [GNC] How to move my Windows 10 2.6.17 to a new Windows, 10 machine?

2018-07-13 Thread Adrien Monteleone
I agree with Michael here.

I can’t imagine the nightmare of trying to restore an entire system or migrate 
it to another physical machine and have to contend with dozens of different 
restore procedures, one for each application based on what those developers 
thought best.

I’d much rather handle this with a single method for the entire system.

Backup, restoration and migration is not a proper function to handle on a 
per-app basis. This is always something that should be done by the user 
according to their own needs and preferences. There are many applications 
dedicated to this very task, some come with operating systems as ’sane 
defaults’ and others are available if a user finds those ’sane defaults’ to not 
meet their needs.

In a worst case, one can always just copy/move files manually. (again, there 
are multiple methods available here, depending on need and preference)

Such a request (to have the particular app handle this) strikes me as coming 
from the perspective that the user thinks the data and settings are contained 
within the app itself somehow. I’m not sure where this idea originates, but 
I’ve come across it so many times. (My parents used to think their documents 
were actually, literally, stored IN ‘MS Word’. It took me many months to get 
them to comprehend otherwise.)

The short answer to the original post is simply - make a backup (using the 
backup procedure included in Win10) of the original system, then restore that 
backup on the new system. If you just want to move GnuCash, that backup/restore 
tool allows you to choose what you want to include so only include the GnuCash 
relevant files.

Windows has had a backup and migration assistant included for at least a decade 
now. The desired tool already exists. (I used it a few months ago to copy a 
user profile to 5 different machines - data, preferences and all)

Regards,
Adrien

> On Jul 13, 2018, at 7:46 AM, Mike or Penny Novack 
>  wrote:
> 
> On 7/13/2018 8:20 AM, Stan Brown wrote:
>> I think there's a mechanism for entering that as a request for the product, 
>> and I think it would be a great idea. Programs in general ought to make it 
>> easier not just to move their settings but to back them up.
>> 
>> P.S. I'm not really a programmer any more, but I still keep my hand in with 
>> various forms of scripting, mainly AWK and batch files. One day I'll learn 
>> Windows PowerShell, maybe.
>> 
> Absolutely not. Not on a program by program, application by application basis.
> 
> Look, if on computer there is a data area ... users/user-name/. and if 
> THIS (entire directory) is copied to back-up then ALL of that user's data has 
> been backed up in one operation.
> 
> SPACE (cheap these days) is the only good reason to do incremental back-ups. 
> But if this method is used, should be neither the responsibility of programs 
> nor manual actions by the user, but an automated back-up system designed for 
> the purpose << say runs every night and makes a (new) back-up of every file 
> that has changed since the day before >>
> 
> Michael D Novack
> ___
> gnucash-user mailing list
> gnucash-user@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@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.

Re: [GNC] How to move my Windows 10 2.6.17 to a new Windows, 10 machine?

2018-07-13 Thread Mike or Penny Novack

On 7/13/2018 8:20 AM, Stan Brown wrote:

I think there's a mechanism for entering that as a request for the product, and 
I think it would be a great idea. Programs in general ought to make it easier 
not just to move their settings but to back them up.

P.S. I'm not really a programmer any more, but I still keep my hand in with 
various forms of scripting, mainly AWK and batch files. One day I'll learn 
Windows PowerShell, maybe.

 Absolutely not. Not on a program by program, application by 
application basis.


Look, if on computer there is a data area ... users/user-name/. and 
if THIS (entire directory) is copied to back-up then ALL of that user's 
data has been backed up in one operation.


SPACE (cheap these days) is the only good reason to do incremental 
back-ups. But if this method is used, should be neither the 
responsibility of programs nor manual actions by the user, but an 
automated back-up system designed for the purpose << say runs every 
night and makes a (new) back-up of every file that has changed since the 
day before >>


Michael D Novack
___
gnucash-user mailing list
gnucash-user@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.


Re: [GNC] How to move my Windows 10 2.6.17 to a new Windows, 10 machine?

2018-07-13 Thread Stan Brown
On Fri, Jul 13, 2018, at 4:59 AM, Norbert Klein wrote:
> Thanks, Stan, for sharing your work with all.
... 
> I still hope there will be - some time in the not too distant future - a 
> program which can be used also by a non-programmer to move a well 
> working GnuCash system from one Widows 10 computer to a new Windows 10 
> computer.

I think there's a mechanism for entering that as a request for the product, and 
I think it would be a great idea. Programs in general ought to make it easier 
not just to move their settings but to back them up.

P.S. I'm not really a programmer any more, but I still keep my hand in with 
various forms of scripting, mainly AWK and batch files. One day I'll learn 
Windows PowerShell, maybe.

-- 
Stan Brown
the_stan_br...@fastmail.fm
http://BrownMath.com
http://OakRoadSystems.com/
___
gnucash-user mailing list
gnucash-user@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.


Re: [GNC] How to move my Windows 10 2.6.17 to a new Windows, 10 machine?

2018-07-13 Thread Mike or Penny Novack

On 7/13/2018 4:59 AM, Norbert Klein wrote:

Thanks, Stan,

for sharing your work with all.

But it only makes me feel sorry - I am a non-programmer user of 
GnuCash :-(


I still hope there will be - some time in the not too distant future - 
a program which can be used also by a non-programmer to move a well 
working GnuCash system from one Widows 10 computer to a new Windows 10 
computer.


Still not giving up hope.

Norbert 


This is not really a "program which can be used by a non-programmer" 
issue. It is more a issue about "computer used by a non-programmer" 
issue (a special case of a more general problem). Computer users who do 
not have a "support person" have to learn how to do SOME basic tasks for 
themselves.


How do you move ANY data between devices, between computers or from 
computer to backup device and how to restore from backup? Do you see why 
your question "how do I move gnucash data?" is just a special case of 
this more general problem << how do I move data from my old computer to 
a back-up device, USB stick or external drive  or network place,  and 
how do I "restore" this data to my computer, in this case the new one.


If you don't know how to make backups of your data and restore from 
backup and you don't have a "support person" to do tasks like this for 
you, then you as a computer user have to learn how to do this basic 
(absolutely necessary) thing for yourself.  If you do not have back-ups, 
it is not a question of whether you will lose your data but when you 
will lose your data. Not just your gnucash data but ALL of your data.


Michael D Novack
___
gnucash-user mailing list
gnucash-user@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.


Re: [GNC] How to move my Windows 10 2.6.17 to a new Windows, 10 machine?

2018-07-13 Thread Maf. King
Norbert.  Don't over think this.  Which word processor do you use?  How did 
you move all your wordprocessor documents, template & settings from old to 
new?

GC really isn't very different.  you have one or more accounts data files 
(ie.documents) saved somewhere (there are also some auto-backup copies of 
these in the same folders, but it is not required to copy these backups - GC 
will make more in due course) and possibly some customised reports in another 
folder - which you have been told about.

you need to move the data file(s) and ~/.gnucash folder as outlined in the FAQ 
links you have been given.  Some display settings/preferences may not make it 
over because they are stored in the windows registry - but a quick once-
through of the preferences dialog box should let you put things back as you 
like.  No programming needed.

HTH,
Maf.
 

On Friday, 13 July 2018 09:59:04 BST Norbert Klein wrote:
> Thanks, Stan,
> 
> for sharing your work with all.
> 
> But it only makes me feel sorry - I am a non-programmer user of GnuCash :-(
> 
> I still hope there will be - some time in the not too distant future - a
> program which can be used also by a non-programmer to move a well
> working GnuCash system from one Widows 10 computer to a new Windows 10
> computer.
> 
> Still not giving up hope.
> 
> Norbert
> 
> On 13.7.2018 5:29, Stan Brown wrote:
> > Dick, here is a batch file I use to save and restore my GnuCash settings
> > and reports, for transferring them between machines.  You'd need to
> > change my file names and paths to yours, but still it could save you
> > some time.
> > 
> > If you don't want to be elaborate as I am -- my batch files tend to be a
> > bit over-engineered -- just look for the "reg" lines. Those are the ones
> > that save or restore the settings and reports.
> > 
> >> @set MYECHO=echo off
> >> @%MYECHO
> >> set RZIPNAME=_stanReports.zip
> >> set GFILNAME=_stanSettings.reg
> >> setlocal
> >> set MYNAME=%@name[%0]
> >> if "%1" ne "/?" .and. "%1" ne "-?" .and. "%1" ne "" goto 000_Start
> >> echo off
> >> echo.
> >> echo %MYNAME: Save or restore GnuCash settings
> >> echo.
> >> echo options:
> >> echo /q Quiet
> >> echo /v Verbose
> >> echo /purge Delete saved log files (used with "save" or "apply")
> >> echo save   Save settings
> >> echo apply  Apply saved settings
> >> echo purge  Delete saved log files.
> >> echo Just one of 'save', 'apply', 'purge' is required.
> >> echo.
> >> echo Settings are saved in %GFILNAME and %RZIPNAME, in the same
> >> echo folder as the GnuCash accounting file.
> >> quit
> >> *
> >> *** 2018-02-25  new program
> >> 2018-03-21  Add the purge option.
> >> 2018-03-31  With 'purge', suppress error message if there are no files
> >> ...
> >> 2018-04-01  ... and also delete GnuCash files in %TEMP%.
> >> 2018-04-18  Add /purge as an option, used with "save" or "apply".
> >> 2018-05-05  Program didn't abort after an an unknown option.
> >> 
> >>  Copyright 2018 Stan Brown, Oak Road Systems 
> >>  http://oakroadsystems.com/
> >> 
> >> *
> >> ***>> 
> >> :000_Start
> >> :
> >> :: Scan the options.
> >> 
> >> set ACTION=none
> >> set PURGING=0
> >> set VERBOSE=1
> >> do while "%1" ne ""
> >> 
> >>  iff %1 == save .or. %1 == apply .or. %1 == purge then
> >>  
> >>  iff %ACTION ne none then
> >>  
> >>  echo %MYNAME: Only one of 'save', 'apply', purge is allowed.
> >>  cancel
> >>  
> >>  endiff
> >>  set ACTION=%@lower[%1]
> >>  
> >>  elseiff %1 == /q then
> >>  
> >>  set VERBOSE=0
> >>  
> >>  elseiff %1 == /v then
> >>  
> >>  set VERBOSE=2
> >>  
> >>  elseiff %1 == /purge then
> >>  
> >>  set PURGING=1
> >>  
> >>  else
> >>  
> >>  echo %MYNAME: Unknown option '%1'.
> >>  cancel 2
> >>  
> >>  endiff
> >>  shift
> >> 
> >> enddo
> >> iff %ACTION == none then
> >> 
> >>  echo %MYNAME: You need one of 'save', 'apply', or 'purge'.
> >>  cancel
> >> 
> >> elseiff %VERBOSE == 2 then
> >> 
> >>  echo %MYNAME: Plaanning to %ACTION the %@if[%ACTION ==
> >>  purge,files,settings]. echo.
> >> 
> >> endiff
> >> 
> >> :: Check existence of files and folders.
> >> :: 
> >>  set GDIR=e:\sb\$\GnuCash
> >> 
> >> iff not isdir "%GDIR" then
> >> 
> >>  echo %MYNAME: Financials folder '%GDIR' not found.
> >>  cancel
> >> 
> >> elseiff not exist "%GDIR\Stan.gnucash" then
> >> 
> >>  echo %MYNAME: File Stan.gnucash not found in '%GDIR'.
> >>  cancel
> >> 
> >> endiff
> >> set RDIR=%USERPROFILE\.gnucash
> >> set RZIP=%GDIR\%RZIPNAME
> >> set GKEY=HKCU\Software\GSettings\org\gnucash
> >> set GFIL=%GDIR\%GFILNAME
> >> iff %VERBOSE == 2 then
> >> 
> >>  echo %MYNAME: Financial 

Re: [GNC] How to move my Windows 10 2.6.17 to a new Windows, 10 machine?

2018-07-13 Thread Norbert Klein

Thanks, Stan,

for sharing your work with all.

But it only makes me feel sorry - I am a non-programmer user of GnuCash :-(

I still hope there will be - some time in the not too distant future - a 
program which can be used also by a non-programmer to move a well 
working GnuCash system from one Widows 10 computer to a new Windows 10 
computer.


Still not giving up hope.

Norbert


On 13.7.2018 5:29, Stan Brown wrote:

Dick, here is a batch file I use to save and restore my GnuCash settings
and reports, for transferring them between machines.  You'd need to
change my file names and paths to yours, but still it could save you
some time.

If you don't want to be elaborate as I am -- my batch files tend to be a
bit over-engineered -- just look for the "reg" lines. Those are the ones
that save or restore the settings and reports.


@set MYECHO=echo off
@%MYECHO
set RZIPNAME=_stanReports.zip
set GFILNAME=_stanSettings.reg
setlocal
set MYNAME=%@name[%0]
if "%1" ne "/?" .and. "%1" ne "-?" .and. "%1" ne "" goto 000_Start
echo off
echo.
echo %MYNAME: Save or restore GnuCash settings
echo.
echo options:
echo /q Quiet
echo /v Verbose
echo /purge Delete saved log files (used with "save" or "apply")
echo save   Save settings
echo apply  Apply saved settings
echo purge  Delete saved log files.
echo Just one of 'save', 'apply', 'purge' is required.
echo.
echo Settings are saved in %GFILNAME and %RZIPNAME, in the same
echo folder as the GnuCash accounting file.
quit

2018-02-25  new program
2018-03-21  Add the purge option.
2018-03-31  With 'purge', suppress error message if there are no files ...
2018-04-01  ... and also delete GnuCash files in %TEMP%.
2018-04-18  Add /purge as an option, used with "save" or "apply".
2018-05-05  Program didn't abort after an an unknown option.

 Copyright 2018 Stan Brown, Oak Road Systems  http://oakroadsystems.com/

:000_Start

:: Scan the options.
set ACTION=none
set PURGING=0
set VERBOSE=1
do while "%1" ne ""
 iff %1 == save .or. %1 == apply .or. %1 == purge then
 iff %ACTION ne none then
 echo %MYNAME: Only one of 'save', 'apply', purge is allowed.
 cancel
 endiff
 set ACTION=%@lower[%1]
 elseiff %1 == /q then
 set VERBOSE=0
 elseiff %1 == /v then
 set VERBOSE=2
 elseiff %1 == /purge then
 set PURGING=1
 else
 echo %MYNAME: Unknown option '%1'.
 cancel 2
 endiff
 shift
enddo
iff %ACTION == none then
 echo %MYNAME: You need one of 'save', 'apply', or 'purge'.
 cancel
elseiff %VERBOSE == 2 then
 echo %MYNAME: Plaanning to %ACTION the %@if[%ACTION == 
purge,files,settings].
 echo.
endiff

:: Check existence of files and folders.
 set GDIR=e:\sb\$\GnuCash
iff not isdir "%GDIR" then
 echo %MYNAME: Financials folder '%GDIR' not found.
 cancel
elseiff not exist "%GDIR\Stan.gnucash" then
 echo %MYNAME: File Stan.gnucash not found in '%GDIR'.
 cancel
endiff
set RDIR=%USERPROFILE\.gnucash
set RZIP=%GDIR\%RZIPNAME
set GKEY=HKCU\Software\GSettings\org\gnucash
set GFIL=%GDIR\%GFILNAME
iff %VERBOSE == 2 then
 echo %MYNAME: Financial database is in folder '%GDIR'.
 echo %MYNAME: GnuCash reports are in folder '%RDIR'.
 echo %MYNAME: GnuCash reports are zipped in file '%RZIP'.
 echo %MYNAME: GnuCash settings are in '%GKEY'.
 echo %MYNAME: GnuCash settings are exported to file '%GFIL'.
 echo.
endiff

iff %ACTION == save then
 if %PURGING == 1 gosub PurgeAction
 iff not isdir "%RDIR" then
 echo %MYNAME: Reports folder '%RDIR' not found.
 cancel
 endiff
 pushd "%RDIR"
 set ZIPOPT=
 set OPTS=-r -T -o
 if %VERBOSE lt 2 set OPTS=%OPTS -q
 @if %VERBOSE ge 1 echo on
 zip %OPTS "%RZIP" *
 @%MYECHO
 @echo.
 popd
 @if %VERBOSE ge 1 echo on
 reg export %GKEY "%GFIL" /y
 @%MYECHO

elseiff %ACTION == apply then
 if %PURGING == 1 gosub PurgeAction
 iff not exist "%GFIL" then
 echo %MYNAME: Registy export file '%GFIL' not found.
 cancel
 endiff
 iff not exist "%RZIP" then
 echo %MYNAME: Reports ZIP file '%RZIP' not found.
 cancel
 endiff
 iff not isdir "%RDIR" then
 echo %MYNAME: Reports folder '%RDIR' not found.
 input /c /k"yYnN" /l1 Create it?^  %%X
 echo.
 if %X == N cancel
 md "%RDIR"
 endiff
 set OPTS=-uo
 if %VERBOSE == 0 set OPTS=%OPTS -q
 @if %VERBOSE ge 1 echo on
 unzip %OPTS "%RZIP" -d "%RDIR"
 @%MYECHO
 @echo.
 @if %VERBOSE ge 1 echo on
 reg delete %GKEY /f
 @echo.
 reg import "%GFIL"
 @%MYECHO

elseiff %ACTION == purge then
 gosub PurgeAction

else
 echo %MYNAME: Internal error: %%ACTION = '%ACTION'
 cancel

Re: [GNC] How to move my Windows 10 2.6.17 to a new Windows, 10 machine?

2018-07-12 Thread Stan Brown
Dick, here is a batch file I use to save and restore my GnuCash settings
and reports, for transferring them between machines.  You'd need to
change my file names and paths to yours, but still it could save you
some time.

If you don't want to be elaborate as I am -- my batch files tend to be a
bit over-engineered -- just look for the "reg" lines. Those are the ones
that save or restore the settings and reports.

> @set MYECHO=echo off
> @%MYECHO
> set RZIPNAME=_stanReports.zip
> set GFILNAME=_stanSettings.reg
> setlocal
> set MYNAME=%@name[%0]
> if "%1" ne "/?" .and. "%1" ne "-?" .and. "%1" ne "" goto 000_Start
> echo off
> echo.
> echo %MYNAME: Save or restore GnuCash settings
> echo.
> echo options:
> echo /q Quiet
> echo /v Verbose
> echo /purge Delete saved log files (used with "save" or "apply")
> echo save   Save settings
> echo apply  Apply saved settings
> echo purge  Delete saved log files.
> echo Just one of 'save', 'apply', 'purge' is required.
> echo.
> echo Settings are saved in %GFILNAME and %RZIPNAME, in the same
> echo folder as the GnuCash accounting file.
> quit
> 
> 2018-02-25  new program
> 2018-03-21  Add the purge option.
> 2018-03-31  With 'purge', suppress error message if there are no files ...
> 2018-04-01  ... and also delete GnuCash files in %TEMP%.
> 2018-04-18  Add /purge as an option, used with "save" or "apply".
> 2018-05-05  Program didn't abort after an an unknown option.
> 
> Copyright 2018 Stan Brown, Oak Road Systems  http://oakroadsystems.com/
> 
> :000_Start
> 
> :: Scan the options.
> set ACTION=none
> set PURGING=0
> set VERBOSE=1
> do while "%1" ne ""
> iff %1 == save .or. %1 == apply .or. %1 == purge then
> iff %ACTION ne none then
> echo %MYNAME: Only one of 'save', 'apply', purge is allowed.
> cancel
> endiff
> set ACTION=%@lower[%1]
> elseiff %1 == /q then
> set VERBOSE=0
> elseiff %1 == /v then
> set VERBOSE=2
> elseiff %1 == /purge then
> set PURGING=1
> else
> echo %MYNAME: Unknown option '%1'.
> cancel 2
> endiff
> shift
> enddo
> iff %ACTION == none then
> echo %MYNAME: You need one of 'save', 'apply', or 'purge'.
> cancel
> elseiff %VERBOSE == 2 then
> echo %MYNAME: Plaanning to %ACTION the %@if[%ACTION == 
> purge,files,settings].
> echo.
> endiff
> 
> :: Check existence of files and folders.
> set GDIR=e:\sb\$\GnuCash
> iff not isdir "%GDIR" then
> echo %MYNAME: Financials folder '%GDIR' not found.
> cancel
> elseiff not exist "%GDIR\Stan.gnucash" then
> echo %MYNAME: File Stan.gnucash not found in '%GDIR'.
> cancel
> endiff
> set RDIR=%USERPROFILE\.gnucash
> set RZIP=%GDIR\%RZIPNAME
> set GKEY=HKCU\Software\GSettings\org\gnucash
> set GFIL=%GDIR\%GFILNAME
> iff %VERBOSE == 2 then
> echo %MYNAME: Financial database is in folder '%GDIR'.
> echo %MYNAME: GnuCash reports are in folder '%RDIR'.
> echo %MYNAME: GnuCash reports are zipped in file '%RZIP'.
> echo %MYNAME: GnuCash settings are in '%GKEY'.
> echo %MYNAME: GnuCash settings are exported to file '%GFIL'.
> echo.
> endiff
> 
> iff %ACTION == save then
> if %PURGING == 1 gosub PurgeAction
> iff not isdir "%RDIR" then
> echo %MYNAME: Reports folder '%RDIR' not found.
> cancel
> endiff
> pushd "%RDIR"
> set ZIPOPT=
> set OPTS=-r -T -o
> if %VERBOSE lt 2 set OPTS=%OPTS -q
> @if %VERBOSE ge 1 echo on
> zip %OPTS "%RZIP" *
> @%MYECHO
> @echo.
> popd
> @if %VERBOSE ge 1 echo on
> reg export %GKEY "%GFIL" /y
> @%MYECHO
> 
> elseiff %ACTION == apply then
> if %PURGING == 1 gosub PurgeAction
> iff not exist "%GFIL" then
> echo %MYNAME: Registy export file '%GFIL' not found.
> cancel
> endiff
> iff not exist "%RZIP" then
> echo %MYNAME: Reports ZIP file '%RZIP' not found.
> cancel
> endiff
> iff not isdir "%RDIR" then
> echo %MYNAME: Reports folder '%RDIR' not found.
> input /c /k"yYnN" /l1 Create it?^  %%X
> echo.
> if %X == N cancel
> md "%RDIR"
> endiff
> set OPTS=-uo
> if %VERBOSE == 0 set OPTS=%OPTS -q
> @if %VERBOSE ge 1 echo on
> unzip %OPTS "%RZIP" -d "%RDIR"
> @%MYECHO
> @echo.
> @if %VERBOSE ge 1 echo on
> reg delete %GKEY /f
> @echo.
> reg import "%GFIL"
> @%MYECHO
> 
> elseiff %ACTION == purge then
> gosub PurgeAction
> 
> else
> echo %MYNAME: Internal error: %%ACTION = '%ACTION'
> cancel
> endiff
> quit
> 
> :PurgeAction
> set OPTS=/R /E
> if %VERBOSE lt 2 set OPTS=/T %OPTS
> echos %MYNAME: purging ... ``
> del %OPTS %GC\*.gnucash.20* %TEMP\gnc-report*html;gnucash*log
> return


-- 

Re: [GNC] How to move my Windows 10 2.6.17 to a new Windows 10 machine?

2018-07-12 Thread DaveC49
Thanks Liz,

I didn't think of the preferences. 

David



-
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
___
gnucash-user mailing list
gnucash-user@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.


Re: [GNC] How to move my Windows 10 2.6.17 to a new Windows 10 machine?

2018-07-11 Thread Dick Gardner
David, thanks, that works slick as you said.  I've been known to over-think
at times.  Once again. . .

Liz,  RE:Preferences, to amateur-me it looks like the registry differences
between the old and new installs are minor. I've read the FAQ but I don't
know how to actually move the old keys over I'm going to live with it as-is
for now rather than mess it up. I haven't saved any custom reports.

I appreciate all the help.

Dick Gardner


On Wed, Jul 11, 2018 at 5:35 AM Liz  wrote:

> On Tue, 10 Jul 2018 19:27:21 -0700 (MST)
> DaveC49  wrote:
>
> > Dick,
> > All that is necessary is to copy the .gnucash file from that
> > directory to the new computer (usb stick is probably easiest) where
> >  is the name you originally gave your Gnucash file. This is
> > the only file that it is necessary to copy to transfer to your new
> > machine
> >
> > You will find a lot of files of the form
> > .gnucash..gnucash  and
> > .gnucash..log
> > in the directory.
> >
> > These are backup and log files and are created each time you open
> > GnuCash. They are useful if the primary file above becomes corrupted
> > as you can restore from a backup file by applying the subsequent
> > logfiles.  You can copy these over as well if you wish. It is
> > probably a good idea to keep a few of the most recent of each file
> > type.
> >
> > Once you have copied the file into an appropriate directory in the
> > \Users on the new machine , if you start GnuCash and then File->Open
> > from the menu and then direct it to and open the .gnucash
> > file you copied you will be up and running. Next time it should open
> > that file by default.
> >
> > David Cousens
> >
> >
>
> This is incomplete. Copying only this file will not copy the
> preferences and the saved reports (if any).
> Check the FAQ, above and below this one
>
> https://wiki.gnucash.org/wiki/FAQ#Q:_I_moved.2Frenamed_my_data_file_and_my_reports_disappeared._How_do_I_get_them_back.3F
>
> Liz
> ___
> gnucash-user mailing list
> gnucash-user@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@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.


Re: [GNC] How to move my Windows 10 2.6.17 to a new Windows 10 machine?

2018-07-11 Thread Liz
On Tue, 10 Jul 2018 19:27:21 -0700 (MST)
DaveC49  wrote:

> Dick,
> All that is necessary is to copy the .gnucash file from that
> directory to the new computer (usb stick is probably easiest) where
>  is the name you originally gave your Gnucash file. This is
> the only file that it is necessary to copy to transfer to your new
> machine
> 
> You will find a lot of files of the form 
> .gnucash..gnucash  and
> .gnucash..log
> in the directory. 
> 
> These are backup and log files and are created each time you open
> GnuCash. They are useful if the primary file above becomes corrupted
> as you can restore from a backup file by applying the subsequent
> logfiles.  You can copy these over as well if you wish. It is
> probably a good idea to keep a few of the most recent of each file
> type.
> 
> Once you have copied the file into an appropriate directory in the
> \Users on the new machine , if you start GnuCash and then File->Open
> from the menu and then direct it to and open the .gnucash
> file you copied you will be up and running. Next time it should open
> that file by default.
> 
> David Cousens
> 
> 

This is incomplete. Copying only this file will not copy the
preferences and the saved reports (if any).
Check the FAQ, above and below this one
https://wiki.gnucash.org/wiki/FAQ#Q:_I_moved.2Frenamed_my_data_file_and_my_reports_disappeared._How_do_I_get_them_back.3F

Liz
___
gnucash-user mailing list
gnucash-user@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.


Re: [GNC] How to move my Windows 10 2.6.17 to a new Windows 10 machine?

2018-07-11 Thread DaveC49
Dick,
All that is necessary is to copy the .gnucash file from that
directory to the new computer (usb stick is probably easiest) where
 is the name you originally gave your Gnucash file. This is the
only file that it is necessary to copy to transfer to your new machine

You will find a lot of files of the form 
.gnucash..gnucash  and
.gnucash..log
in the directory. 

These are backup and log files and are created each time you open GnuCash.
They are useful if the primary file above becomes corrupted as you can
restore from a backup file by applying the subsequent logfiles.  You can
copy these over as well if you wish. It is probably a good idea to keep a
few of the most recent of each file type.

Once you have copied the file into an appropriate directory in the \Users 
on the new machine , if you start GnuCash and then File->Open from the menu
and then direct it to and open the .gnucash file you copied you
will be up and running. Next time it should open that file by default.

David Cousens





-
David Cousens
--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
___
gnucash-user mailing list
gnucash-user@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.