Private fsoTest As New FileSystemObject
Private folder1 As Folder
-----------------------
Set folder1 = fsoTest.GetFolder("d:\")
debug.print folder1.Size/1024/1024
Do While ((ret <> 0) And Running)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'handle the file here
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If (Find_Data.lFileAttributes And FILE_ATTRIBUTE_DIRECTORY) <> 0 Then
If (Left(Find_Data.cFileName, 1) <> ".") Then 'is a directory
'Debug.Print Pathname & "\" & TrimZeroSuffix(Find_Data.cFileName) & "\"
Call Addfiles(PathName & "\" & TrimZeroSuffix(Find_Data.cFileName), ID)
End If
Else
'is a file
'handle the file here
TotalSize =TotalSize + ConvertSize(Find_Data.nFileSizeHigh, Find_Data.nFileSizeLow)
'Debug.Print Pathname & "\" & TrimZeroSuffix(Find_Data.cFileName)
End If
DoEvents
ret = FindNextFile(lhandle, Find_Data)
CountX = CountX + 1