; ############################################################################################ ; Nick: GONZO - Email: gonzomail@gmail.com alias indexar1 { ; Indexa el directorio c:\windows\help entero, guardando los datos: ; $findfile(%index.ruta,*,N) <--- ruta ; $file($findfile(%index.ruta,*,N)).size <--- tamaño ; $file($findfile(%index.ruta,*,N)).ctime <--- tiempo var %index.ruta = c:\mIRC var %t $ticks remove index.rutas.txt remove index.size.txt remove index.tiempo.txt echo 2  Indexando: %index.ruta var %index 1 var %archivo = $findfile(%index.ruta,*,1) while (%archivo) { write index.rutas.txt %archivo write index.size.txt $file(%archivo).size write index.tiempo.txt $file(%archivo).ctime var %archivo = $findfile(%index.ruta,*,%index) inc %index } echo 2  %index archivos indexados en $calc(($ticks - %t)/1000) $+ s } alias buscar1 { if (($1 == ruta) && ($2) && (!$3)) { var %t = $ticks ; Busca por ruta. ISIN echo 2  Busqueda por $1 $+ :  $2 var %index 1 var %ruta = $read(index.rutas.txt,%index) while (%ruta) { if ($2 isin %ruta) { echo 12 Busqueda> %ruta - $read(index.size.txt,%index) $+ Bytes - $asctime($read(index.tiempo.txt,%index)) } var %ruta = $read(index.rutas.txt,%index) inc %index } } elseif (($1 == tamaño) && ($2 isnum) && (!$3)) { var %t = $ticks ; Busca por tamaño. IF echo 2  Busqueda por $1 $+ :  $2 var %index 1 var %ruta = $read(index.size.txt,%index) while (%ruta) { if ($2 == %ruta) { echo 12 Busqueda> $read(index.rutas.txt,%index) - %ruta $+ Bytes - $asctime($read(index.tiempo.txt,%index)) } var %ruta = $read(index.size.txt,%index) inc %index } } elseif (($1 == tiempo) && ($2 isnum) && ($len($2) == 9) && (!$3)) { var %t = $ticks ; Busca por tiempo. IF echo 2  Busqueda por $1 $+ :  $2 var %index 1 var %ruta = $read(index.tiempo.txt,%index) while (%ruta) { if ($2 == %ruta) { echo 12 Busqueda> $read(index.rutas.txt,%index) - $read(index.size.txt,%index) $+ Bytes - $asctime(%ruta) } var %ruta = $read(index.tiempo.txt,%index) inc %index } } echo 2  Busqueda realizada en %index archivos  $calc(($ticks - %t)/1000) $+ s } alias desindexar1 { remove index.rutas.txt | remove index.size.txt | remove index.tiempo.txt } ; Nick: Racy - Email: racy.2004@gmail.com alias indexar2 { var %dir = c:\windows\help\ if (%dir) { var %time = $ticks $iif($hget(indexara),.hfree -s indexara,) $iif($hget(indexart),.hfree -s indexart,) $iif($hget(indexarf),.hfree -s indexarf,) var %b = 1 while ($finddir(%dir,*,%b)) { hadd -m indexara %b $+ - $+ $gettok($ifmatch,-1,92) $ifmatch inc %b } var %a = 1 while ($findfile(%dir,*,%a)) { hadd -m indexara %a $+ - $+ $nopath($ifmatch) $ifmatch $file($ifmatch).size $file($ifmatch).ctime hadd -m indexart %a $+ - $+ $file($ifmatch).size $ifmatch $file($ifmatch).size $file($ifmatch).ctime hadd -m indexarf %a $+ - $+ $file($ifmatch).ctime $ifmatch $file($ifmatch).size $file($ifmatch).ctime inc %a } echo -a Fin de la indexacion en %dir :: $findfile(%dir,*,0) Archivos encontrados y $finddir(%dir,*,0) SubDirectorios Recorridos :: Tiempo: $calc($ticks - %time) $+ m.s. } } alias buscar2 { if (($1 == ruta) && ($2)) { echo 12 -s Buscando " $+ $2 $+ " en la base de datos... var %t = $ticks, %a = 1, while ($hfind(indexara,* $+ $2 $+ *,%a,w)) { var %datos = $hget(indexara,$ifmatch) echo -s Busqueda > $gettok(%datos,1,32) $iif($gettok(%datos,2,32),- $gettok(%datos,2,32) $+ Bytes,) $iif($gettok(%datos,3,32),- $asctime($gettok(%datos,3,32)),) inc %a } echo 5 -s Fin de la Busqueda por "Ruta". Realizada en $calc($ticks - %t) $+ ms echo -s - } elseif (($1 == tamaño) && ($2 isnum) && (!$3)) { echo 12 -s Buscando Tamaño de archivo " $+ $2 $+ Bytes" en la base de datos... var %t = $ticks var %a = 1 var %archivos = 0 while ($hfind(indexart,*- $+ $2,%a,w)) { echo -s Busqueda > $gettok($hget(indexart,$ifmatch),1,32) - $gettok($hget(indexart,$ifmatch),2,32) $+ Bytes - $asctime($gettok($hget(indexart,$ifmatch),3,32)) inc %archivos inc %a } echo 5 -s Fin de la Busqueda por "Tamaño". Realizada en $calc($ticks - %t) $+ ms. echo -s - } elseif (($1 == tiempo) && ($2 isnum) && ($len($2) >= 9) && (!$3)) { echo 12 -s Buscando Fecha de archivo " $+ $2 $+ " en la base de datos... var %t $ticks var %a = 1 var %archivos = 0 while ($hfind(indexarf,* $+ $2 $+ *,%a,w)) { echo -s Busqueda > $gettok($hget(indexarf,$ifmatch),1,32) - $gettok($hget(indexarf,$ifmatch),2,32) $+ Bytes - $asctime($gettok($hget(indexarf,$ifmatch),3,32)) inc %archivos inc %a } echo 5 -s Fin de la Busqueda por "Fecha". Realizada en $calc($ticks - %t) $+ ms. echo -s - } } ; ############################################################################################ ; Nick: viRCiaDo - Email: hesma69@hotmail.com alias buscar3 { if (($1 == ruta) && ($2) && (!$3)) { var %t = $ticks, %u = 1 | .window -nh @kk | .loadbuf @kk w.txt while ($line(@kk,%u)) { if ($replace($2,$chr(47),$chr(92)) isin $gettok($ifmatch,1,32)) { echo -s Búsqueda > $gettok($line(@kk,%u),1,32) $+($gettok($line(@kk,%u),2,32),Bytes) $asctime($gettok($line(@kk,%u),3,32)) } | inc %u } .window -c @kk } if (($1 == tamaño) && ($2 isnum) && (!$3)) { var %t = $ticks, %m = 1 | .window -nh @kkk | .loadbuf @kkk w.txt while ($line(@kkk,%m)) { if ($2 == $gettok($ifmatch,2,32)) { echo -s Búsqueda > $gettok($line(@kkk,%m),1,32) $+($gettok($line(@kkk,%m),2,32),Bytes) $asctime($gettok($line(@kkk,%m),3,32)) } | inc %m } .window -c @kkk } if (($1 == tiempo) && ($2 isnum) && ($len($2) == 9) && (!$3)) { var %t = $ticks, %e = 1 | .window -nh @ktk | .loadbuf @ktk w.txt while ($line(@ktk,%e)) { if ($2 == $gettok($ifmatch,3,32)) { echo -s Búsqueda > $gettok($line(@ktk,%e),1,32) $+($gettok($line(@ktk,%e),2,32),Bytes) $asctime($gettok($line(@kek,%e),3,32)) } | inc %e } .window -c @ktk } echo 5 Búsqueda realizada en $calc($ticks - %t) $+ ms } alias indexar3 { if ($exists(w.txt) == $true) { .remove w.txt } | var %- = 1, %tiki = $ticks | echo -s Espere, se está "Indexando" el directorio C:\Windows\Help en w.txt while ($findfile(c:\windows\help,*,%-)) { .write w.txt $findfile(c:\windows\help\,*,%-) $file($findfile(c:\windows\help,*,%-)).size $file($findfile(c:\windows\help,*,%-)).ctime | inc %- } echo 5 -s El directorio ha sido indexado con éxito en $calc($ticks - %tiki) ms. para un total de $+($chr(31),$lines(w.txt),$chr(31)) archivos. } alias desindexar3 { if ($exists(w.txt) == $true) { .remove w.txt } | clear -s } ; Nick: mQ` - Email: mar@marqo.com.ar alias indexar4 { desindexar hmake ruta 100 | hmake tamaño 100 | hmake tiempo 100 | hmake datos 100 var %_f = 1 while ($findfile(c:\windows\help,*,%_f)) { hadd ruta %_f $v1 | hadd tamaño %_f $file($v1).size | hadd tiempo %_f $file($v1).ctime hadd datos %_f Busqueda> $v1 - $+($file($v1).size,Bytes) - $asctime($file($v1).ctime) inc %_f } } ; ############################################################################################ ; DESCALIFICADO: por usar comodines para buscar ; Nick: Marco Palmieri - Email: marcopalmieri@gmail.com alias buscar4 { if (($1 == ruta) && ($2) && (!$3)) { var %t $ticks var %_f = 1 while ($hfind(ruta,* $+ $2 $+ *,%_f,w).data) { echo $hget(datos,$v1) inc %_f } } elseif (($1 == tamaño) && ($2 isnum) && (!$3)) { var %t $ticks var %_f = 1 while ($hfind(tamaño,$2,%_f,n).data) { echo $hget(datos,$v1) inc %_f } } elseif (($1 == tiempo) && ($2 isnum) && ($len($2) == 10) && (!$3)) { var %t $ticks var %_f = 1 while ($hfind(tiempo,$2,%_f,n).data) { echo $hget(datos,$v1) inc %_f } } echo 5 Busqueda realizada en $calc($ticks - %t) $+ ms } alias desindexar4 if ($hget(ruta)) hfree $v1 | if ($hget(tiempo)) hfree $v1 | if ($hget(tamaño)) hfree $v1 | if ($hget(datos)) hfree $v1