Snippets
04

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;

Posted in: C Sharp - C#

Post Rating

Comments

There are currently no comments, be the first to post one!

Post Comment

Only registered users may post comments.

  120 OLD FREEMANS WAY, BREWSTER, MA 02631
  P. O. BOX 2342, BREWSTER, MA 02631
  (774) 323-3176
  CONTACT US