Answer Posted / yogesh
option explicit
Dim objFSO: Set objFSO = CreateObject
("Scripting.FileSystemObject")
Dim colDrives:Set colDrives = objFSO.Drives
Dim objDrive,path,s
For Each objDrive in colDrives
path=objDrive.DriveLetter&":"
SearchPath(Path)
Next
Function SearchPath(Path) ' Defination of function
Dim BigFile,BigSize:BigSize=0
Dim objFSO: Set objFSO = CreateObject
("Scripting.FileSystemObject")
Dim objfolder:Set objfolder= objFSO.GetFolder(path &"\")
Dim ColSubFolders:Set ColSubFolders=objfolder.subfolders
Dim ObjSubFolder,objFile,colFiles
For each ObjSubFolder in ColSubFolders
Set colFiles=objfolder.files
For each objFile in colFiles
if(objFile.size>BigSize) then
BigSize=objFile.size
BigFile=objFile.name
end if
next
next
msgbox BigFile &BigSize
End Function
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why doesnt long int work?
can anyone please tell about the nested interrupts?
Explain about block scope in c?
What is 1f in c?
What is the most efficient way to count the number of bits which are set in an integer?
Explain the concept and use of type void.
How can I call fortran?
What is 'bus error'?
What is multidimensional arrays
What is s in c?
What are preprocessor directives in c?
All technical questions
Explain what are reserved words?
Differentiate between #include<...> and #include '...'
C language questions for civil engineering