mIRC Home    About    Download    Register    News    Help

Topic Options
#59146 - 05/11/03 01:12 AM Back-up mIRC option
fackue Offline
Pikka bird

Registered: 19/10/03
Posts: 11
I was just thinking about reinstalling Windows, and at the same time, I was opening up mIRC. I would like to see a feature that will let you save all yor current settings (fonts, colors, etc.) onto one file, be able to uninstall mIRC, then later, load your settings up just as it was before.

Or possibly just copy all the files's that are needed onto a directory specified (C:\Window\Desktop\mIRC_backup), so you can just overwrite the default settings that are first set when mIRC is first installed.

Yes, I relize you can do it manually, but, an option to do this would be a great addition to mIRC.

Thanks for your time.

Top
#59147 - 05/11/03 01:24 AM Re: Back-up mIRC option
KingTomato Offline
Planetary brain

Registered: 04/01/03
Posts: 3012
Loc: New Hampshire, USA
1. Insert floppy into Drive A: (Floppy Drive)
2. Type the following in mirc:
//run copy $shortfn($mircdirmirc.ini) A:
3. mIRC is now backed up
_________________________
-KingTomato

Top
#59148 - 05/11/03 02:05 AM Re: Back-up mIRC option
Collective Offline
Planetary brain

Registered: 10/12/02
Posts: 3138
Loc: London, UK
Might be better to use $mircini.

Top
#59149 - 05/11/03 04:04 AM Re: Back-up mIRC option
KingTomato Offline
Planetary brain

Registered: 04/01/03
Posts: 3012
Loc: New Hampshire, USA
I suppose, just that 99% of people use the defualt ini. It would also make for shorter coding >:D
_________________________
-KingTomato

Top
#59150 - 05/11/03 05:39 AM Re: Back-up mIRC option
Iori Offline
Hoopy frood

Registered: 30/08/03
Posts: 1831
//run copy? grin

Maybe //copy -o $nopath($mircini) A:
also perform.ini, control.ini etc..

Top
#59151 - 05/11/03 11:17 PM Re: Back-up mIRC option
fackue Offline
Pikka bird

Registered: 19/10/03
Posts: 11
Yeah, thanks... by the time I'd type that all up, I could of manually backup it up crazy (yes, copy/paste). But, this won't back up all my ignores, alias', and whatnot, correct?

I figure making a script would be easy for some to make, but yet, the option still would be nice to have, as a default.

Top
#59152 - 06/11/03 01:09 AM Re: Back-up mIRC option
KingTomato Offline
Planetary brain

Registered: 04/01/03
Posts: 3012
Loc: New Hampshire, USA
in that case...

alias backup {
/run cmd /c xcopy $shortfn($mircdir) $+ \*.* A: /EXCLUDE:mirc.exe
}
_________________________
-KingTomato

Top
#59153 - 07/11/03 11:29 AM Re: Back-up mIRC option
Iori Offline
Hoopy frood

Registered: 30/08/03
Posts: 1831
/exclude:file.ext
file.ext is a file (or files) containing strings to exclude, not a specific file to exclude. wink

So it would be something like
Code:
alias backup {
  write -c exclude.txt exclude.txt
  write exclude.txt .exe
  write exclude.txt .hlp
  write exclude.txt .gid
  write exclude.txt logs\
  write exclude.txt download\
  ; add any other files, extensions or folders to exclude here with the above format.
  run cmd.exe /c xcopy * A:\ /Exclude:exclude.txt /E /D
}


Edit:
Or you could use FOR and COPY, though it won't save the files to their respective directories
  • //run cmd.exe /c for /r $+(",$mircdir,") % $+ I in (*.ini;*.mrc) do copy "%I" A:



Edited by Iori (07/11/03 11:37 AM)

Top
#59154 - 08/11/03 08:21 AM Re: Back-up mIRC option
Wolfie Offline
Fjord artisan

Registered: 07/08/03
Posts: 325
If using XP:
Right click on mirc folder, Send To -> Compressed Folder
smile

If not, then download WinZip or WinRAR, etc, and use that.

Quick and easy.

Top
#59155 - 08/11/03 09:17 AM Re: Back-up mIRC option
qwerty Offline
Hoopy frood

Registered: 07/01/03
Posts: 2523
Just a minor detail, it might be better to use $logdir and $getdir instead of hardcoding logs\ and download\.

Personally I use Winrar for backups, it has tons of command-line switches that can do virtually anything you want and, of course, compresses files, which is handy if you're saving to a floppy.
_________________________
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Top
#59156 - 08/11/03 01:14 PM Re: Back-up mIRC option
Iori Offline
Hoopy frood

Registered: 30/08/03
Posts: 1831
Well, that was just a correction of syntax. wink
$logdir,$getdir might be better. I doubt many people would change those to another foldername and still keep them within the $mircdir tree, but it is possible I guess.

Personally, I don't have a floppy drive so I don't need to worry about compression. smile

Top
#59157 - 08/11/03 01:16 PM Re: Back-up mIRC option
Iori Offline
Hoopy frood

Registered: 30/08/03
Posts: 1831
Well, as i stated above, I posted only for corrections of syntax. If the OP doesn't want to use copy\paste I doubt that using sendto would be much different. smile

Top
#59158 - 08/11/03 01:27 PM Re: Back-up mIRC option
qwerty Offline
Hoopy frood

Registered: 07/01/03
Posts: 2523
Well, that was just a correction of syntax.

Yep, I realise that, I replied mostly for fackue and/or others who may find this useful (I know you know these things) smile
_________________________
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Top
#59159 - 08/11/03 10:06 PM Re: Back-up mIRC option
Iori Offline
Hoopy frood

Registered: 30/08/03
Posts: 1831
Thought about the compression aspect and made one using makecab (so it is For Win NT only). wink
Code:
alias bakup {
  if $isfile(bakup.ddf) { .remove bakup.ddf }
  .fopen -n bak bakup.ddf
  .fwrite -n bak .OPTION EXPLICIT
  .fwrite -n bak .Set $+(CabinetName1=Bakup,$date(yymmdd),.cab)
  .fwrite -n bak .set DiskDirectoryTemplate=A:\
  .fwrite -n bak .Set Cabinet=ON
  .fwrite -n bak .Set Compress=ON
  .echo -q $findfile($mircdir,*.*,0,if ($istok([color:blue]ini mrc[/color],$gettok($1-,-1,46),32)) $&
    .fwrite -n bak $+(",$1-,") $+(",$remove($1-,$mircdir),"))
  .comopen %a WScript.Shell
  if !$comerr { .comclose %a $com(%a,Run,3,bstr,cmd.exe /c makecab /f bakup.ddf /l A:\,uint,0,bool,true) }
  .remove bakup.ddf
  .remove setup.inf
  .remove setup.rpt
}

ini mrc more file ext's can be added

Really it was just a fun waste of time, but someone may find it useful laugh


Edited by Iori (08/11/03 10:19 PM)

Top
#59160 - 09/11/03 01:16 AM Re: Back-up mIRC option
qwerty Offline
Hoopy frood

Registered: 07/01/03
Posts: 2523
Very interesting, and very nicely coded smile I didn't know about makecab, it's a good alternative, since it's free and perhaps more universal (I guess there are more XP users than winrar users).

Oh and just my usual pickiness, you can replace
Code:
  if $isfile(bakup.ddf) { .remove bakup.ddf }
  .fopen -n bak bakup.ddf
with
Code:
  .fopen -n[color:red]o[/color] bak bakup.ddf
_________________________
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Top
#59161 - 09/11/03 06:53 AM Re: Back-up mIRC option
Iori Offline
Hoopy frood

Registered: 30/08/03
Posts: 1831
Good point with the /fopen -no. Thanks smile

I also see I somehow lost the /fclose line :tongue: So here it is again with the changes.
Code:
alias bakup {
  .fopen -no bak bakup.ddf
  .fwrite -n bak .OPTION EXPLICIT
  .fwrite -n bak .Set $+(CabinetName1=Bakup,$date(yymmdd),.cab)
  .fwrite -n bak .Set DiskDirectoryTemplate=[color:red]A:\[/color]
  .fwrite -n bak .Set Cabinet=ON
  .fwrite -n bak .Set Compress=ON
  .echo -q $findfile($mircdir,*.*,0,if ($istok([color:blue]ini mrc[/color],$gettok($1-,-1,46),32)) $&
    .fwrite -n bak $+(",$1-,") $+(",$remove($1-,$mircdir),"))
  .fclose bak
  var %a = $ticks
  .comopen %a WScript.Shell
  if !$comerr { .comclose %a $com(%a,Run,3,bstr,cmd.exe /c makecab /f bakup.ddf /l [color:red]A:\[/color],uint,0,bool,true) }
  .remove bakup.ddf
  .remove setup.inf
  .remove setup.rpt
}
The two instances of "A:\" can be changed to whatever path, without spaces, you want the cab to go to.

Along with a little info on the compression ratio.
Code:
MakeCAB Report: Sun Nov 09 16:41:32 2003

Total files:            976
^^ (976 files were mostly all copies of each other :D) ^^
Bytes before:     5,093,733
Bytes after:      1,407,097
After/Before:            27.62% compression
Time:                     2.84 seconds ( 0 hr  0 min  2.84 sec)
^^ Note this was to a USB external drive ^^ (no floppy drive here to test on)
Throughput:            1749.07 Kb/second

Top