Live Chat Icon For mobile
Live Chat Icon

How to parse the files/folders in the client’s file system?

Platform: ASP.NET| Category: Client Side Scripting

Here is a technique usable in IE Only


	var fso=new ActiveXObject('Scripting.FileSystemObject');
	function ShowFilesIn(path) // path could be 'C:\Test' for example.
	{
		if(fso.FolderExists(path))
		{
			ShowFiles(fso.GetFolder(path)); 
		}  
	}

	function ShowFiles(folderpath)
	{
		var objFso = new Enumerator(folderpath.Files);
		for(i=0;!objFso.atEnd();objFso.moveNext())
		{
			alert(objFso.item().name);
		}
	}

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.