tkFind
Publicado por Fábio Berbert de Paula 13/11/2002
[ Hits: 6.188 ]
Homepage: https://fabio.automatizando.dev
Este script escrito em Tcl/Tk é uma interface gráfica simples para o comando find.
#!/usr/bin/wish
# Programado por Fábio B. de Paula
# Substitui o comando de console Linux find . -name "*" -print
# Licensa: Freeware
# e-mail: fberbert@netflash.com.br
wm title . "TkFind - O caçador de arquivos"
wm minsize . 300 340
proc procurar {dir procurado} {
global cont
set arquivo [glob -nocomplain $dir/* ]
set tamanho [llength $arquivo]
for {set x 0} {$x<$tamanho} {incr x} {
if {[file isdirectory [lindex $arquivo $x]]==0} {
if {[string first $procurado [lindex $arquivo $x]]>0} {
.list1 insert end [lindex $arquivo $x]
incr cont
}
} else {
procurar [lindex $arquivo $x] $procurado
}
}
}
set cont 0
label .l1 -text "Digite o diretório de partida da pesquisa:" -anchor w
entry .e1 -textvar diretorio -width 32
label .l2 -text "Nome do arquivo procurado:" -anchor w
entry .e2 -textvar procurado -width 32
button .b1 -text "Pesquisar" -command {
global cont
.b1 configure -state disabled
set cont 0;
.list1 delete 0 end
procurar $diretorio $procurado
set cont [concat $cont " arquivos encontrados"]
bell
} -width 10 -state disabled
button .b2 -text "Limpar" -command {
set diretorio ""
set procurado ""
set cont 0;
.list1 delete 0 end
focus .e1
} -width 10 -state disabled
scrollbar .scroll1 -command ".list1 yview"
listbox .list1 -width 30 -height 10 -yscroll ".scroll1 set" -bg #FFFFF0
label .l3 -textvar cont -anchor w
bind .e1 <KeyPress> {.b2 configure -state normal}
bind .e1 <Return> {focus .e2}
bind .e2 <KeyPress> {.b2 configure -state normal; .b1 configure -state normal}
bind .e2 <Return> {.b1 invoke}
bind . <Activate> {focus .e1}
place .l1 -x 1 -y 1 -width 298
place .e1 -x 1 -y 22 -width 298
place .l2 -x 1 -y 44 -width 298
place .e2 -x 1 -y 66 -width 298
place .b1 -x 1 -y 88 -width 149
place .b2 -x 150 -y 88 -width 149
place .list1 -x 1 -y 115 -width 285 -height 205
place .scroll1 -x 285 -y 115 -height 205
place .l3 -x 1 -y 320 -width 298
Renomeando arquivos de forma padronizada
Corretagem 0.1 - calcula corretagem padrão de operações da Bovespa
Monitorando o Preço do Bitcoin ou sua Cripto Favorita em Tempo Real com um Widget Flutuante
IA Turbina o Desktop Linux enquanto distros renovam forças
Como extrair chaves TOTP 2FA a partir de QRCODE (Google Authenticator)
Como realizar um ataque de força bruta para desobrir senhas?
Como usar Gpaste no ambiente Cinnamon
Atualizando o Fedora 42 para 43
Atalho para usar interrogação (1)
VOL já não é mais como antes? (12)
Scripts ou binários [RESOLVIDO] (4)
Pergunta: Meu teclado não está respondendo direito como e consertar? ... (4)









