mIRC Home    About    Download    Register    News    Help

Print Thread
Howto backup all settings #57634 26/10/03 02:29 PM
Joined: Oct 2003
Posts: 4
M
mooh Offline OP
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Oct 2003
Posts: 4
Hi,

How to backup all my mirc settings (configuration, servers, remote scripts, performs).

Thanks for your time!


Regards,
M.
Re: Howto backup all settings #57635 26/10/03 03:00 PM
Joined: Jan 2003
Posts: 148
K
Knappen Offline
Vogon poet
Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
Make a copy of mirc.ini ?

Re: Howto backup all settings #57636 26/10/03 03:10 PM
Joined: Oct 2003
Posts: 4
M
mooh Offline OP
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Oct 2003
Posts: 4
Hi,
thanks, no mirc.ini includes not everything I have seen-
other ini files and regsettings are probably needed but i don't know;


Regards,
M.
Re: Howto backup all settings #57637 26/10/03 03:18 PM
Joined: Oct 2003
Posts: 273
E
EVH Offline
Fjord artisan
Offline
Fjord artisan
E
Joined: Oct 2003
Posts: 273
Code:
alias backup {
  if (!$isdir($mircdirBackup)) mkdir $+(",$mircdirBackup,")
  var %i = 1
  while ($script(%i) != $null) {
    if (!$isdir($mircdirBackup\Remote)) mkdir $+(",$mircdirBackup\Remote,")
    if ($isfile($script(%i))) copy -o $+(",$script(%i),") $+(",$mircdirBackup\Remote,\,$nopath($script(%i)),")
    inc %i
  }
  var %i = 1
  while ($alias(%i) != $null) {
    if (!$isdir($mircdirBackup\Aliases)) mkdir $+(",$mircdirBackup\Aliases,")
    if ($isfile($alias(%i))) copy -o $+(",$alias(%i),") $+(",$mircdirBackup\Aliases,\,$nopath($alias(%i)),")
    inc %i
  }
  if (!$isdir($mircdirBackup\Popups)) mkdir $+(",$mircdirBackup\Popups,")
  if ($isfile($readini($mircini,pfiles,n0))) copy -o $+(",$readini($mircini,pfiles,n0),") $+(",$mircdirBackup\Popups\,$nopath($readini($mircini,pfiles,n0)),")
  if ($isfile($readini($mircini,rfiles,n0))) copy -o $+(",$readini($mircini,rfiles,n0),") $+(",$mircdirBackup\,$nopath($readini($mircini,rfiles,n0)),")
  if ($isfile($readini($mircini,rfiles,n1))) copy -o $+(",$readini($mircini,rfiles,n1),") $+(",$mircdirBackup\,$nopath($readini($mircini,rfiles,n1)),")
  if ($isfile($readini($mircini,files,servers))) copy -o $+(",$readini($mircini,files,servers),") $+(",$mircdirBackup\,$nopath($readini($mircini,files,servers)),")
  if ($isfile($readini($mircini,files,urls))) copy -o $+(",$readini($mircini,files,urls),") $+(",$mircdirBackup\,$nopath($readini($mircini,files,urls)),")
  if ($isfile($readini($mircini,files,addrbk))) copy -o $+(",$readini($mircini,files,addrbk),") $+(",$mircdirBackup\,$nopath($readini($mircini,files,addrbk)),")
  if ($isfile($readini($mircini,files,finger))) copy -o $+(",$readini($mircini,files,finger),") $+(",$mircdirBackup\,$nopath($readini($mircini,files,finger)),")
  [color:red]if ($isfile($mircdircontrol.ini)) copy -o $+(",$mircdircontrol.ini,") $+(",$mircdirBackup\control.ini,")[/color]
  [color:red]if ($isfile($mircdirperform.ini)) copy -o $+(",$mircdirperform.ini,") $+(",$mircdirBackup\perform.ini,")[/color]
  if ($isfile($mircini)) copy -o $+(",$mircini,") $+(",$mircdirBackup\,$nopath($mircini),")
}


Pasted normal below so no sorting needed ...

alias backup {
if (!$isdir($mircdirBackup)) mkdir $+(",$mircdirBackup,")
var %i = 1
while ($script(%i) != $null) {
if (!$isdir($mircdirBackup\Remote)) mkdir $+(",$mircdirBackup\Remote,")
if ($isfile($script(%i))) copy -o $+(",$script(%i),") $+(",$mircdirBackup\Remote,\,$nopath($script(%i)),")
inc %i
}
var %i = 1
while ($alias(%i) != $null) {
if (!$isdir($mircdirBackup\Aliases)) mkdir $+(",$mircdirBackup\Aliases,")
if ($isfile($alias(%i))) copy -o $+(",$alias(%i),") $+(",$mircdirBackup\Aliases,\,$nopath($alias(%i)),")
inc %i
}
if (!$isdir($mircdirBackup\Popups)) mkdir $+(",$mircdirBackup\Popups,")
if ($isfile($readini($mircini,pfiles,n0))) copy -o $+(",$readini($mircini,pfiles,n0),") $+(",$mircdirBackup\Popups\,$nopath($readini($mircini,pfiles,n0)),")
if ($isfile($readini($mircini,rfiles,n0))) copy -o $+(",$readini($mircini,rfiles,n0),") $+(",$mircdirBackup\,$nopath($readini($mircini,rfiles,n0)),")
if ($isfile($readini($mircini,rfiles,n1))) copy -o $+(",$readini($mircini,rfiles,n1),") $+(",$mircdirBackup\,$nopath($readini($mircini,rfiles,n1)),")
if ($isfile($readini($mircini,files,servers))) copy -o $+(",$readini($mircini,files,servers),") $+(",$mircdirBackup\,$nopath($readini($mircini,files,servers)),")
if ($isfile($readini($mircini,files,urls))) copy -o $+(",$readini($mircini,files,urls),") $+(",$mircdirBackup\,$nopath($readini($mircini,files,urls)),")
if ($isfile($readini($mircini,files,addrbk))) copy -o $+(",$readini($mircini,files,addrbk),") $+(",$mircdirBackup\,$nopath($readini($mircini,files,addrbk)),")
if ($isfile($readini($mircini,files,finger))) copy -o $+(",$readini($mircini,files,finger),") $+(",$mircdirBackup\,$nopath($readini($mircini,files,finger)),")
if ($isfile($mircdircontrol.ini)) copy -o $+(",$mircdircontrol.ini,") $+(",$mircdirBackup\control.ini,")
if ($isfile($mircdirperform.ini)) copy -o $+(",$mircdirperform.ini,") $+(",$mircdirBackup\perform.ini,")
if ($isfile($mircini)) copy -o $+(",$mircini,") $+(",$mircdirBackup\,$nopath($mircini),")
}

Edit: oops forgot control.ini & perform.ini

Last edited by EVH; 26/10/03 04:27 PM.
Re: Howto backup all settings #57638 26/10/03 07:13 PM
Joined: Oct 2003
Posts: 4
M
mooh Offline OP
Self-satisified door
OP Offline
Self-satisified door
M
Joined: Oct 2003
Posts: 4
Thanks evh, it works like a charm!!


Regards,
M.
Re: Howto backup all settings #57639 26/10/03 08:09 PM
Joined: Oct 2003
Posts: 273
E
EVH Offline
Fjord artisan
Offline
Fjord artisan
E
Joined: Oct 2003
Posts: 273
most welcome smile