mIRC Home    About    Download    Register    News    Help

Print Thread
#59146 05/11/03 01:12 AM
Joined: Oct 2003
Posts: 11
F
fackue Offline OP
Pikka bird
OP Offline
Pikka bird
F
Joined: Oct 2003
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.

#59147 05/11/03 01:24 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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
#59148 05/11/03 02:05 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Might be better to use $mircini.

#59149 05/11/03 04:04 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
I suppose, just that 99% of people use the defualt ini. It would also make for shorter coding >:D


-KingTomato
#59150 05/11/03 05:39 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
//run copy? grin

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

#59151 05/11/03 11:17 PM
Joined: Oct 2003
Posts: 11
F
fackue Offline OP
Pikka bird
OP Offline
Pikka bird
F
Joined: Oct 2003
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.

#59152 06/11/03 01:09 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
in that case...

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


-KingTomato
#59153 07/11/03 11:29 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
/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:


Last edited by Iori; 07/11/03 11:37 AM.
#59154 08/11/03 08:21 AM
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
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.

#59155 08/11/03 09:17 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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
#59156 08/11/03 01:14 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
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

#59157 08/11/03 01:16 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
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

#59158 08/11/03 01:27 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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
#59159 08/11/03 10:06 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
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

Last edited by Iori; 08/11/03 10:19 PM.
#59160 09/11/03 01:16 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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
#59161 09/11/03 06:53 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
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


Link Copied to Clipboard