AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FileCheck()

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Sakurako



Joined: 10 May 2007
Posts: 149
Location: China/ Canada

PostPosted: Tue Mar 11, 2008 1:20 am    Post subject: FileCheck() Reply with quote

Code:
FileSelectFolder, FolderName
If FolderName =
 return
TimeCheck := A_TickCount
FileCheck(FolderName, ".*")
TimeCheck := A_TickCount - TimeCheck
Msg := "<" TimeCheck / 1000 ">`n" FolderName "   " FileCheck1
Loop
 If 1_%A_Index% <>
  Msg .= "`n" 1_%A_Index% "   " SubStr(1_%A_Index%Check, InStr(1_%A_Index%Check, "\", 0, 0) + 1)
 Else
  break
Gui, Add, Edit, R30, %Msg%
Gui, Show,, FileCheck() Test
return
Code:
FileCheck(FolderName, FolderCheck = ".*", ListNum = 1)
{
 global
; administrator mode recommended
 FileCheck%ListNum% := 0
 Loop %FolderName%\*.*, 1, 0
 {
  IfInString, A_LoopFileAttrib, D
  {
   If RegExMatch(A_LoopFileLongPath, FolderCheck)
    FileCheck(A_LoopFileLongPath, FolderCheck, ListNum "_" A_Index)
   Else
    FileCheck%ListNum%_%A_Index% = 000000
   %ListNum%_%A_Index% := FileCheck%ListNum%_%A_Index%
  }
  Else
   %ListNum%_%A_Index% := A_LoopFileSize
  %ListNum%_%A_Index%Check := A_LoopFileLongPath
  FileCheck%ListNum% += %ListNum%_%A_Index%
 }
}

_________________
Back to top
View user's profile Send private message Visit poster's website
Lawrence



Joined: 20 Feb 2008
Posts: 5

PostPosted: Tue Mar 11, 2008 2:37 am    Post subject: Reply with quote

it's good function. i like it. Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group