12-22-2009, 09:12 PM
Hi ,
Try with the below code for your query "How to get the files in a parent folder?"
Try with the below code for your query "How to get the files in a parent folder?"
Code:
Set objFileSysOb = CreateObject("Scripting.FileSystemObject")
Set colFolderName = objFileSysOb.GetFolder("Give your Parent Folder path here")
Set vFiles =colFolderName.Files
For each i in vFiles
d=Split(i,"\")
FileName=d(ubound(d))
msgbox FileName
Next