Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 432 Vote(s) - 3.56 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Listing local filenames with specific extensions in directory on local website

#1
I have a web page on a local, networked drive. I want to list files with a .xlsm extension in a certain directory on that web page. Here's the HTML I'm using to show ALL files within a specific directory.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Show Local Folder File List</title>
</head>
<body>
<div>
<script type="text/JScript">
//note this is JScript, not javascript. Thus the 'type="text/JScript"' in the script tags

function ShowFolderFileList(folderspec){
var fso, f, fc, s;
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFolder(folderspec);
fc = new Enumerator(f.files);
s = "";
for (; !fc.atEnd(); fc.moveNext()) {
s += fc.item();
s += "<br>";
}
return s;
}

//note folder/file paths should use the local windows style backslash and be escaped '\\' :
var fileList = ShowFolderFileList('H:\\Folder1/Folder2/Folder3');
document.write(fileList);

</script>
</div>
</body>
</html>
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through