Read Files from Folder using "FileSystemObject"
Say in particular foler, there are so many files, i want read each and every file one by one from specific foler, how can we do that??
i have just read only one file by taking first file as a string and declared as a default file, code is like below:
================================================== ===============
Dim f as New Scripting.FileSystemObject
Dim file As Scripting.File
Dim folder As Scripting.Folder
Dim DefaultFile As String
Dim MyFile As String
Set Folder = f.GetFolder("C:\Temp")
DefaultFile = "somefile"
FindFile = DefaultFile & ".txt"
If f.FileExists(folder.Path & "\" & MyFile) Then
//do something for first file
end if
================================================== ===============
If there are 5 files in folder, then it should read one-by-one... ANY IDEAS ??
~ ~ ~ There is no Right, There is no Wrong, KNOWLEDGE is Only the POWER ~ ~ ~
__________________
~ ~ ~ There is no Right, There is no Wrong, KNOWLEDGE is Only the POWER ~ ~ ~
|