Advertisement
Guest User

[AHK] File Counter

a guest
Mar 3rd, 2015
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #SingleInstance force
  2. #NoEnv
  3.  
  4. Base = Drop folder to work on here
  5. x = %1%
  6. Loop, %x%, 2
  7.     Base = %A_LoopFileLongPath%
  8.  
  9. GUI:
  10. Gui, Add, Text, vBase Center w256 h128 r2, %Base%
  11. Gui, Add, Text, y+16 x8, Find
  12. Gui, Add, ComboBox, x+ w64 vPattern, *||*.mp3|*.jpg|thumbs.db
  13. Gui, Add, DDL, x+8 w64 vFind, Files||Folders|Both
  14. Gui, Add, Checkbox, x+8 vRecurse, Recurse?
  15. Gui, Add, Button, x+8 gCount, Count
  16. Gui, Font, s18, Consolas
  17. Gui, Add, Text, y+8 x8 vCount Center w256
  18. Gui, Show
  19. return
  20.  
  21. Count:
  22. Gui, Submit, NoHide
  23. Count := 0
  24. Find := 1
  25. If (Find = "Files")
  26.     Find := 0
  27. Else If (Find = "Folders")
  28.     Find := 2
  29. Loop, %Base%\%Pattern%, %Find%, %Recurse%
  30.     Count := A_Index
  31. GuiControl,, Count, %Count%
  32. return
  33.  
  34. GuiDropFiles:
  35. Run, %A_ScriptFullPath% %A_GuiEvent%
  36. return
  37.  
  38. Exit:
  39. GuiClose:
  40. GuiEscape:
  41. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement