|
|
posted on March 04, 2013 05:43
object objFSO;
SetobjFSO = Server.CreateObject("Scripting.FileSystemObject");
// Get the folder object associated with the directory
object objFolder;
SetobjFolder = objFSO.GetFolder("C:\\VitualDomains\\wwwroot");
lblOutput.Text = "The files found in "
+ objFolder.Name + ":<br>";
object objFile;
foreach (objFile in objFolder.Files)
{
lblOutput.Text +=
objFile.Name + "<br>";
}
// Clean up!
SetobjFolder = null;
SetobjFile = null;
SetobjFSO = null;
There are currently no comments, be the first to post one!