Tuesday, June 24, 2008

How to get a files from a Folder through VB Scripting

Dim objFSO 'This is the FSO variable

Dim objFolder

' Create the File System Object and get a folder

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objFolder = objFSO.GetFolder("D:\pavan")

' Grab a collection of files

Set colFiles = objFolder.Files

For each objFile in colFiles

'Wscript.Echo

msgbox "Name: " & objFile.Name

Next


Regards,

Pavankumar Nandagiri................

Google Search

Google