kenny9239 Posted January 13, 2009 Share Posted January 13, 2009 Hi all,Can you tell my what "Scripting" does in the line below line?set objFSO = Server.CreateObject("Scripting.FileSystemObject") Link to comment Share on other sites More sharing options...
aalbetski Posted January 14, 2009 Share Posted January 14, 2009 This is the name of the object and class created by Microsoft that enables you to access the file system using your server-side code.This example is using the Windows Scripting Host to show a list of files in a folder. In can be easily modified for use by ASP as well var fso = new ActiveXObject("Scripting.FileSystemObject");var aArgs = WScript.Arguments;var sSourceDirectory = new String(aArgs(0));ShowFilesInFolder()function ShowFilesInFolder(){ var files,folder,file; folder = fso.GetFolder(sSourceDirectory); files = new Enumerator(folder.files); for (;!files.atEnd();files.moveNext()) { var theFile = files.item(); WScript.Echo(theFile.name) }} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.