yogesh patil in dell

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


Please Help Members By Posting Answers For Below Questions

How can you convert integers to binary or hexadecimal?

610


What are file streams?

560


What is omp_num_threads?

572


What does %d do in c?

537


What is a header file?

629






Explain how do you view the path?

644


A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile

634


#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }

762


What is the benefit of using #define to declare a constant?

599


What are the salient features of c languages?

616


how do you execute a c program in unix.

634


What does the c preprocessor do?

613


How do we make a global variable accessible across files? Explain the extern keyword?

1414


What are the scope of static variables?

596


Explain how do you list files in a directory?

610