Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Need to show user Windows Explorer

Posted on 2003-10-28
3
Medium Priority
?
251 Views
Last Modified: 2012-08-13
Hi all,

I want whenever my web page load on user machine at that time, through FSO or any other way. i want to show user their hard disk information like windows explorer does..

waiting for your all kind response.

Sahdev
0
Comment
Question by:SahdevSingh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Expert Comment

by:mr_brij
ID: 9639804
u mean like directories in c drive or the hard disk info .. like how much space used or left ??

if for the directory .. u have the fso.... for the usage will have to check
0
 
LVL 21

Accepted Solution

by:
ap_sajith earned 750 total points
ID: 9640320
Copy the code below and test it out yourself... Btw.. most of the text in there is french..

<html>
<head>
<title>Selection de repertoire</title>
<style type="text/css">
body {
 font-family : Tahoma;
 font-size : xx-small;
}
a, a:hover, a:active {
 font-family : Tahoma;
 font-size : xx-small;
}
div {
 font-family : Tahoma;
 font-size : xx-small;
 border : 1px solid #000000;
 padding : 5px;
}
</style>
<script language="JavaScript">

var FSO;
var sOut = "";
var nl = "<br>" + String.fromCharCode(13);
var ImgPath = "Img/";
var sImgFolder = "&nbsp;&nbsp;&nbsp;<img src=\"" + ImgPath + "folder.gif\"";
sImgFolder += " width=\"15\" height=\"13\" border=\"0\">&nbsp;";
var sImgFolderUp = "&nbsp;&nbsp;&nbsp;<img src=\"" + ImgPath + "folder_up.gif\"";
sImgFolderUp += " width=\"15\" height=\"13\" border=\"0\">&nbsp;";
var sImgDrive = "&nbsp;&nbsp;&nbsp;<img src=\"" + ImgPath + "drive.gif\"";
sImgDrive += " width=\"15\" height=\"13\" border=\"0\">&nbsp;";
var sImgDriveA = "&nbsp;&nbsp;&nbsp;<img src=\"" + ImgPath + "drive_a.gif\"";
sImgDriveA += " width=\"15\" height=\"13\" border=\"0\">&nbsp;";

var DisplayPath = "";

function replaceAll(inSTR, inTOK, inREP) {
 var s;
 s = inSTR + "";
 while (s.indexOf(inTOK) >= 0) {
  s = s.replace(inTOK, "§");
 };
 while (s.indexOf("§") >= 0) {
  s = s.replace("§", inREP);
 };
 return s;
};

function getQuery(inINDX){
 var queryString = location.search;
 if (queryString != "") {
  var data = queryString.slice(1,queryString.length);
  var aData = data.split("&");
  var aOut = aData[inINDX].split("=");
  return aOut[1];
 } else {
  return "NoData";
 }
};

function GetCurrentFolder() {
 return DisplayPath;
};

function GoToDrives() {
 DisplayPath = "";
 GetDrives();
};

function GoToFolder(inFOLDER) {
 DisplayPath = inFOLDER;
 GetFolders();
};

function GetFolders() {
 // Balayage Repertoires
 var rep, sRep, i, t;
 sOut = "";
 sOut += DisplayPath + "<br><br>";
 t = DisplayPath.substring(0, DisplayPath.length - 1);
 t = t.substring(0, t.lastIndexOf(String.fromCharCode(92)) + 1);
 if (t + "" != "") {
  sOut += sImgFolderUp + "<a href=\"javascript:GoToFolder('";
  sOut += replaceAll(t, String.fromCharCode(92), "\\\\") + "');\" border=\"0\">";
  sOut += "Repertoire Parent</a><br>";
 } else {
  sOut += sImgFolderUp + "<a href=\"javascript:GoToDrives();\" border=\"0\">";
  sOut += "Repertoire Parent</a><br>"
 }
 try {
  rep = FSO.GetFolder(DisplayPath);
  var rOK = true;
 }
 catch (e) {
  var rOK = false;
 }
 if (rOK) {
  sRep = new Enumerator(rep.SubFolders);
  if (sRep.atEnd()) {
   sOut += "&nbsp;&nbsp;&nbsp;Pas de sous-repertoires";
  } else {
   for (i = 0; !sRep.atEnd(); sRep.moveNext()) {
    sOut += sImgFolder + "<a href=\"javascript:GoToFolder('";
    sOut += replaceAll(sRep.item(), String.fromCharCode(92), "\\\\") + "\\\\');\" border=\"0\">";
    sOut += sRep.item() + "\\</a>" + nl;
   };
  }
 } else {
  sOut += "&nbsp;&nbsp;&nbsp;Pas de sous-repertoires";
 }
 document.getElementById("SRInterface").innerHTML = sOut;
}

function GetDrives() {
 // Balayage Disques
 var drv, i;
 sOut = "";
 sOut += "Poste de travail<br><br>";
 var drvGlo = new Enumerator(FSO.Drives);
 for (i = 0; !drvGlo.atEnd(); drvGlo.moveNext()) {
  drv = drvGlo.item();
  if (drv.DriveType == 2) {
   sOut += sImgDrive + "<a href=\"javascript:GoToFolder('";
   sOut += drv.DriveLetter + ":\\\\');\" border=\"0\">";
   sOut += drv.DriveLetter + ":\\</a>" + nl;
  } else if (drv.DriveType == 1) {
   sOut += sImgDriveA + "<a href=\"javascript:GoToFolder('";
   sOut += drv.DriveLetter + ":\\\\');\" border=\"0\">";
   sOut += drv.DriveLetter + ":\\</a>" + nl;
  }
 };
 document.getElementById("SRInterface").innerHTML = sOut;
};

function DoLoad() {
 var ActiveXOK;
 try {
  var FSOT = new ActiveXObject("Scripting.FileSystemObject");
  ActiveXOK = true;
 }
 catch (e) {
  ActiveXOK = false;
 }
 if (ActiveXOK) {
  FSOT = null;
  FSO = new ActiveXObject("Scripting.FileSystemObject");
  GetDrives();
 } else {
  var lf = "<br>" + String.fromCharCode(13);
  sOut = "";
  sOut += "Ce script est dedié Internet Explorer." + lf;
  sOut += "L'utilisation de ce script nécessite une configuration de la securite de votre navigateur." + lf;
  sOut += "Allez dans Menu Outils > Options Internet >";
  sOut += " Sécurité > Personnaliser le niveau > Contrôles ActiveX et plugins" + lf;
  sOut += "Authorisez l'utilisation des composants ActiveX."
  document.getElementById("SRInterface").innerHTML = sOut;
 }
};
</script>
</head>

<body onLoad="DoLoad();">
<div id="SRInterface"></div>
<br>
<br>
<a href="javascript:alert(GetCurrentFolder());" border="0">
Recuperer le repertoire en cours (javascript:GetCurrentFolder();)
</a>
</body>
</html>

Cheers!!
0
 
LVL 21

Expert Comment

by:ap_sajith
ID: 9649373
why just grade b??. The above solution is exactly what you asked for!

Cheers!!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question