Belini Posted October 11, 2012 Posted October 11, 2012 (edited) List files that exceed the limit supported by Windows. expandcollapse popup; ============================================================= ; Autoit3 3.3.9.2 ; Autor: Belini ; Data: 11/10/2012 ; Objetivo: Listar pastas e arquivos com endereço muito extenso ; ============================================================= #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Global $caminho, $limite = 255, $numera = 0, $listar If FileExists(@ScriptDir & "Caminho longo.ini") Then FileDelete(@ScriptDir & "Caminho longo.ini") GUICreate("Listar arquivos com nome extenso.", 352, 132, 192, 114) GUICtrlCreateLabel("Listar arquivos como número de caractéres maior ou igual a:", 8, 58, 287, 17) Local $Input_caminho = GUICtrlCreateInput(@ScriptDir, 8, 16, 259, 21) Local $Input_limite = GUICtrlCreateInput($limite, 296, 56, 49, 21) Local $Button_proc = GUICtrlCreateButton("Procurar", 269, 14, 75, 25) Local $Button_iniciar = GUICtrlCreateButton("Iniciar Listagem", 88, 96, 163, 25) GUICtrlSetFont(-1, 10, 800, 0, "Arial") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button_proc $caminho = FileSelectFolder("Procurando pasta.", "", "", @ScriptDir) GUICtrlSetData($Input_caminho, $caminho) Case $Button_iniciar $caminho = GUICtrlRead($Input_caminho) $limite = GUICtrlRead($Input_limite) If Not FileExists($caminho) Then MsgBox(4096, "ERRO", "O caminho a ser pesquisado não existe.", 3) If $limite <= 0 Then MsgBox(4096, "ERRO", "Digite um limite de caractéres para iniciar a listagem.", 3) SplashTextOn("Lista:", "Listando arquivos, aguarde...", 280, 40, -1, -1, 33, "Arial black", 12) If FileExists($caminho) And $limite > 0 Then listar_cam_longo($listar, $caminho) MsgBox(4096, "Finalizado:", "Foram listados " & $numera & " arquivos com mais de " & $limite & " Caractéres.") SplashOff() exit EndSwitch WEnd Func listar_cam_longo(ByRef $listar, $path = "") $counter = 0 $path &= '' Local $list_files = '', $file, $demand_file = FileFindFirstFile($path & '*') If $demand_file = -1 Then Return '' While 1 $file = FileFindNextFile($demand_file) If @error Then ExitLoop If @extended Then If $counter >= 10 Then ContinueLoop listar_cam_longo($listar, $path & $file) Else If StringLen($path & $file) > $limite Then $numera += 1 TrayTip("Listando", $file, 1, 0) IniWrite(@ScriptDir & "Caminho longo.ini", "CAMINHO EXTENSO", $path & $file, StringLen($path & $file) & " linhas") EndIf EndIf WEnd FileClose($demand_file) EndFunc ;==>listar_cam_longo Edited October 11, 2012 by Belini My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
JScript Posted October 11, 2012 Posted October 11, 2012 My friend, you hardly have replicas in posts with scripts in Portuguese, so here is a fact: the forum is in English language!!! In any case, nice script... JS http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere!
Belini Posted October 11, 2012 Author Posted October 11, 2012 I'm just too busy and did not have time to translate practical. My Codes: Virtual Key Code UDF: http://www.autoitscript.com/forum/topic/138246-virtual-key-code-udf/ GuiSplashTextOn.au3: http://www.autoitscript.com/forum/topic/143542-guisplashtexton-udf/ Menu versions of Autoit: http://www.autoitscript.com/forum/topic/137435-menu-versions-of-autoit/#entry962011 Selects first folder of letters: ]http://www.autoitscript.com/forum/topic/144780-select-folders-by-letter/#entry1021708/spoiler] List files and folders with long addresses.: http://www.autoitscript.com/forum/topic/144910-list-files-and-folders-with-long-addresses/#entry102 2926 Program JUKEBOX made in Autoit:some functions:http://www.youtube.com/watch?v=WJ2tC2fD5Qs Navigation to search:http://www.youtube.com/watch?v=lblwOFIbgtQ
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now