SoFunction
Updated on 2025-04-09

Hard disk browsing program, save it in web format and use it


<html>
<head>
<script language="javascript" type="text/javascript">
var errorinf=new Error();
var fso,fdrive,ffolder,ffile;
var getdata="",selfpath="",drvpath="",favpath="";
var drive=new Array(),favorite=new Array();
var currentdrive="";
var hidestate=false;
var lastdrive="",lastfav="";
var ppath=new Error(),ppathcounter=0,favcounter=0;
var openfromfav=0;
function initdoc()
{
try
{
   var outstr="",counter=0,i=0,writestr="";
   fso=new ActiveXObject("");
   selfpath=((/\//,""));
   drvpath=selfpath+"\\";
   /*Get the hard drives on the computer.*/
   if(!(drvpath))
      {
         fdrive=;
         getdata=new Enumerator(fdrive);
         for(;!();())
           if(().DriveType==2)
             {
                drive[counter]=().DriveLetter;
                writestr+=drive[counter]+"$";
                counter++;
              }
         ffile=(drvpath,true);
         writestr=(/\$$/,"");
         (writestr+"\r");
         ();
      }
   else
      {
        ffile=(drvpath,1);
        getdata=().replace(/\'|\"|\\|\/|\:|\s+/g,"");
        getdata=(/^\$+|\$+$/,"");
        getdata=(/\$\$+/,"$");
        drive=("$");
        ();
      }
   for(i=0;i<;i++)
outstr+="[<a href='' id='drive"+drive[i]+"' onClick=\"driveactive(drive["+i+"]);return false;\">Local disk:"+drive[i]+"</a>]";
outstr+="Show hidden content<input style='height:15px;border:none;' type='checkbox' id='showorhide' onClick='hidestate=;flashdrive();'>"
   ("drives").innerHTML=outstr;
   getdata="";outstr="";
   /*Get the exist item.*/
   favpath=selfpath+"\\";
   if((favpath))
    {
      ffile=(favpath,1);
      if(!)
       {
          getdata=().replace(/\"|\s+/g,"");
          getdata=(/^\|+|\|+$/,"");
          getdata=(/\|\|+/,"|");
          favorite=("|");
       }
      ();
      if(favorite[0]=="")
        favcounter=0;
      else
        favcounter=;
    }
   else
    {
      ffile=(favpath,true);
      ();
      favcounter=0;
    }  
   openfav();
   driveactive("C");
   getdata="";
}catch(errorinf){alert(+"\n\nPlease do not change the contents in the data file*.ini file.");}
}
function driveactive(driveval)
{
try{  
   if(lastdrive==("drive"+driveval)&&(/^[a-z]\:\\$/i))
     {
       ("showorhide").focus();
       return false;
     }
   if(lastdrive=="")lastdrive="driveC";
   (lastdrive).="#CCCCCC";
   lastdrive="drive"+driveval;
   (lastdrive).="#FFFFDD";
   var att="",drv,totalsize,freespace,usespace,outstr="",pathstr="",attribu=0,subfolfil="",fcount=0;
   drv=(driveval);
   totalsize=((/(2,30))*100)/100;
   freespace=((/(2,30))*100)/100;
   usespace=((totalsize-freespace)*100)/100;
   totalsize>1 ? totalsize+="GB":totalsize=totalsize*(2,10)+"MB";
   freespace>1 ? freespace+="GB":freespace=freespace*(2,10)+"MB";
   usespace>1 ? usespace+="GB":usespace=usespace*(2,10)+"MB";
att+="Local disk:"+driveval+"\nFile system:"++"\nDisk size:"+totalsize+"\nUsed space:"+usespace+"\nAvailable space:"+freespace+"\n";
   outstr="";
   currentdrive=pathstr=driveval+":\\";
   ffolder=(pathstr+"\\").SubFolders;
   getdata=new Enumerator(ffolder);
outstr="<div class='showcon'>Folder:[<a href='' onclick=\"return unfurlorfold('folshow',this);\">Hide</a>]<div id='folshow'>";
   ppathcounter=0;
   for(;!();())
    {
     attribu=().Attributes;
     if(hidestate||attribu==16||attribu==17||attribu==48||attribu==49)
      {
        fcount++;
        ppath[ppathcounter]=driveval+":\\"+().name;
        outstr+="<div><a href='' onClick=\"folderactive(ppath["+ppathcounter+"]);"
        outstr+="return false;\">"+().Name+"</a></div>";
        ppathcounter++;
      }
    }
subfolfil="Find"+fcount+" folders,";
   fcount=0;
   ffile=(pathstr).Files;
   getdata=new Enumerator(ffile);
outstr+="</div></div><div class='showcon'>text&nbsp;&nbsp;&nbsp;[<a href='' onclick=\"return unfurlorfold('filshow',this);\">Hide</a>]<div id='filshow'>";
   for(;!();())
    {
     attribu=().Attributes;
     if(hidestate||attribu==0||attribu==1||attribu==32||attribu==33)
      {
        fcount++;
        outstr+="<div><a href=\""+currentdrive+"\" target='_blank'>"+().Name+"</a></div>";
      }
    } 
   outstr+="</div></div>";
subfolfil+=fcount+"file.";
   ("showcontent").innerHTML=outstr;
   ("currentdrive").innerText=currentdrive;
   ("showdriveatt").innerText=att;
att="Folder Name:\n\nFolder Size:\nCreation Time:\n\nModification Time:\n\n Access Time:\n\n";
   ("showfolderatt").innerText=att;
   ("subfolfil").innerText=subfolfil;
att="[<a href=\""+currentdrive+"\" target='_blank'>Open</a>]";
att+="[<a href='' onclick=\"addfav();return false;\">Favorite</a>]";
   ("openfol").innerHTML=att;
   ("showorhide").focus();
   getdata="";
}catch(errorinf){alert(+"\n\nPlease do not change the contents in the data file*.ini file.");}
}
function folderactive(folderval)
{
try
{
   var att="",fol="",totalsize=0,sizesign="";
   openfolder(folderval);
   if(!(/^[a-z]\:\\$/i))
    {
     fol=(folderval);
     totalsize=/(2,30);
     totalsize>1 ? sizesign="GB":(totalsize=totalsize*(2,10),sizesign="MB");
     (totalsize<1 && sizesign=="MB") ? (totalsize=totalsize*(2,10),sizesign="KB"):{}
     totalsize=((totalsize)*100)/100+sizesign;
att+="Folder name:\n"++"\nFolder size:"+totalsize+"\nCreation time:\n";
att+=+"\nModify time:\n"++"\nAccess time:\n"+;
     ("showfolderatt").innerText=att+"\n";
    }
}catch(errorinf){alert(+"\n\nPlease do not change the contents in the data file*.ini file.");}
}
function openfolder(currfolder)
{
try
{
   var sign=0,outstr="",attribu=0,subfolfil="",fcount=0;
if(currfolder==""){alert("No folder selected.");return false;}
   currentdrive=currfolder;
   ffolder=(currfolder).SubFolders;
   getdata=new Enumerator(ffolder);
outstr="<div class='showcon'>Folder:[<a href='' onclick=\"return unfurlorfold('folshow',this);\">Hide</a>]<div id='folshow'>";
   ppathcounter=0;
   for(;!();())
    {
     attribu=().Attributes;
     if(hidestate||attribu==16||attribu==17||attribu==48||attribu==49)
      {
        fcount++;
        ppath[ppathcounter]=(/\\+$/i,"")+"\\"+().name;
        outstr+="<div><a href='' onClick=\"folderactive(ppath["+ppathcounter+"]);"
        outstr+="return false;\">"+().Name+"</a></div>";
        ppathcounter++;
      }
    }
subfolfil="Find"+fcount+" folders,";
   fcount=0;
   ffile=(currfolder).Files;
   getdata=new Enumerator(ffile);
outstr+="</div></div></div><div class='showcon'>text&nbsp;&nbsp;&nbsp;[<a href='' onclick=\"return unfurlorfold('filshow',this);\">Hide</a>]<div id='filshow'>";
   for(;!();())
    {
     attribu=().Attributes;
     if(hidestate||attribu==0||attribu==1||attribu==32||attribu==33)
      {
        fcount++;
        if(openfromfav==0)
          outstr+="<div><a href=\""+currentdrive+"\" target='_blank'>"+().Name+"</a></div>";
        else
          outstr+="<div><a href=\""+currentdrive+"\\"+().Name+"\" target='_blank'>"+().Name+"</a></div>";
      }
    }   
   outstr+="</div></div>";  
subfolfil+=fcount+"file.";
   ("showcontent").innerHTML=outstr;
   ("currentdrive").innerText=currentdrive;
att="Folder Name:\n\nFolder Size:\nCreation Time:\n\nModification Time:\n\n Access Time:";
   ("showfolderatt").innerText=att;
   ("subfolfil").innerText=subfolfil;
att="[<a href=\""+currentdrive+"\" target='_blank'>Open</a>]";
att+="[<a href='' onclick=\"addfav();return false;\">Favorite</a>]";
   ("openfol").innerHTML=att;
   getdata="";
   openfromfav=0;
}catch(errorinf){alert(+"\n\nPlease do not change the contents in the data file*.ini file.");}
}
function upfile()
{
   var rootpath="";
   rootpath=currentdrive;
   if(!(/^[a-z]\:\\$/i))
     {
        rootpath=(/\\[^\\]*$/,"");
        if((/^[a-z]\:$/i)){rootpath+="\\";}
        folderactive(rootpath);
     }
   else
alert("Drive root directory.");
}
function flashdrive()
{
  folderactive(currentdrive);
}
function openfav()
{
   lastfav="";
   var outstr="",i=0;
   for(i;i<favcounter;i++)
    {
      outstr+="<a id='fav"+i+"' href='' onclick=\"openfromfav=1;folderactive(favorite["+i+"]);"
      outstr+="favactive();return false;\" target='_blank'>"+favorite[i].replace(/^.+\\/,"")+"</a><br>";
    }
   ("showfavorite").innerHTML=outstr;
   ("delfav").value="";
}
function favactive(favid)
{
   var i=parseInt((/\d/));
   if(lastfav!="")
      (lastfav).="#CCCCCC";
   lastfav=favid;
   ("delfav").value=favorite[i];
   (lastfav).="#FFFFDD";
   ("showorhide").focus();
}
function addfav()
{
try
{
   if((/^[a-z]\:\\$/i))
     {
alert("Folders can only be collected.");
       return false;
     }
   var i=0;
   for(i=0;i<favcounter;i++)
     {
       if(favorite[i]==currentdrive)
         {
alert("This folder already exists in common folders.");
            return false;
         }
     }
   if((favpath))
     {
       ffile=(favpath,8);
     }
   else
     {
       ffile=(favpath,true);
     }
   ("|"+currentdrive);
   ();
   favorite[favcounter]=currentdrive;
   favcounter++;
   openfav();
alert("Added successfully.");
}catch(errorinf){alert(+"\n\nPlease do not delete data files*.ini files.");}
}
function delfav()
{
try
{
   var delpath=("delfav").value;
   var i=(/\d/),j=parseInt(i);
   var newfav="";
   ("showorhide").focus();
   if(delpath=="")
     {
alert("No common folder is selected.");
        return false;
     }
if(confirm("Confirm to delete common folders (not from hard disk):\n"+delpath+"\n?"))
     {
        favcounter--;
        for(j;j<favcounter;j++)
          favorite[j]=favorite[j+1];
        for(j=0;j<favcounter;j++)
          newfav+=favorite[j]+"|";
        ffile=(favpath,2);
        newfav=(/^\||\|$/,"");
        (newfav);
        ();
        openfav();
        ("delfav").value="";
alert("Delete successfully.");
     }

}catch(errorinf){("delfav").value="";alert(+"\n\nPlease do not delete data files*.ini files at will.");}
}
function unfurlorfold(objid,obj)
{
if(=="Hide")
     {
="Show";
       (objid).="none";
     }
  else
     {
="Hide";
       (objid).="";
     }  
  ("showorhide").focus(); 
  return false;  
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>FileLookThroughAdmin V1.0</title>
<style type="text/css">
<!--
body{
background-color:#EEEEEE;}

{
background-color:#CCCCCC;
width:100%;
padding:6px 10px 10px;}

h1{font-size:36px;
font-family:"Chinese Colorful Cloud";
color:#0000FF;}

hr{
width:95%;
text-align:left;}

{
table-layout:fixed;
word-wrap:break-word;
width:100%;
font-size:12px;
background-color:#EEEEEE;}
 td{
background-color:#CCCCCC;}

#drive{}
{
vertical-align:top;
padding:5px;}
{
height:430px;
vertical-align:top;}
 {
width:100%;}
  div div{
padding:1px 0px;
width:49%;
float:left;}

a:link{text-decoration:none;
color:#0000FF;}
a:active{text-decoration:none;
color:#0000FF;}
a:visited{text-decoration:none;
color:#0000FF;}
a:hover{
text-decoration:underline;
color:#FF0000;
background-color:#FFFFDD;}

.button{
border:none;
height:20px;
width:50px;
background-color:#CCCCCC;}

{
vertical-align:top;
padding:5px;}
-->
</style>
</head>
<body onLoad="javascript:initdoc();status='FileLookThroughAdmin V1.0';">
<div class="main">
  <h1>FileLookThroughAdmin</h1>
  <div style="margin-top:-36px;"><hr></div>
  <div style="margin-top:-14px;position:relative;left:5%;"><hr></div>
  <div>
    <table class="tableclass">
      <tr align="center">
<td width="18%">Favorites</td>
<td width="60%">Folders and Files</td>
<td>Related Information</td>
      </tr>
      <tr>
        <td align="center">
          HardDrives>>
        </td>
        <td colspan="2">
          <div ></div>
        </td>
      </tr>
      <tr>
        <td align="center">
          Tag>>
        </td>
        <td align="center" colspan="2">
          DisplayContent
        </td>
      </tr>
      <tr>
        <td align="center">
          CurrentPath>>
        </td>
        <td colspan="2">
          <div ></div>
        </td>
      </tr>
      <tr>
        <td class="fav">
<div>Common folders:</div>
          <div ></div>
        </td>
        <td rowspan="2" class="folderfile">
          <div onclick="upfile();" style="height:15px;cursor:pointer;padding-top:5px;" align="center"
           onmouseover="='#FFFFDD';"
           onmouseout="='#CCCCCC';">
Previous level directory</div>
          <div  style="padding-left:5px;"></div>
        </td>
        <td rowspan="2" class="drvinf">
<font color="#FF0000">Current drive information:</font>
          <div ></div>
<font color="#FF0000">Current folder information:</font>
          <span ></span>
          <div ></div>
          <div  style="color:#FF0000;"></div>
        </td>
      </tr>
      <tr>
        <td class="fav">
<div>Delete common folders:</div><br>
          <div align="center">
            P:<input  type="text" style="border:none;" readonly><br><br>
[<a href="" onClick="delfav();return false;">Execute Delete</a>]
          </div>
        </td>
      </tr>
    </table>
  </div>
</div>
<div>
  <font style="font-size:12px;cursor:default;" color="#666666" onmouseover="='#FF0000'" onmouseout="='#666666'">
    Design:(∮LKing♂)[FS:Ecjtu2006|QQ:28857496|E-Mail:@][@06.11]
  </font>
</div>
</body>
</html>