[Perl] Funcion hideit()

Iniciado por BigBear, 12 Octubre 2011, 16:43 PM

0 Miembros y 1 Visitante están viendo este tema.

BigBear

Con esta funcion podran esconder o mostraR archivos/directorios ocultos en windows

Código (perl) [Seleccionar]
#By Doddy H
use Win32::File;

sub hideit {
if ($_[1] eq "show") {
Win32::File::SetAttributes($_[0],NORMAL);
}
elsif ($_[1] eq "hide") {
Win32::File::SetAttributes($_[0],HIDDEN);
}
else {
print "error\n";
}
}


Ejemplo de uso show/hide

Código (perl) [Seleccionar]

hideit("test.pl","show");