Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > displaying clients machine folder and files

Thread Tools

displaying clients machine folder and files
Posts: n/a

I have attached a javascript file my name folder.js. what i am doing
in this .js file is i am passing the path of the directory and listing
them in the html table, again if there is any subfolder in that i
create a link and call (folderdisp(path)) this function recurrsively.
But problem is that i am not able to refresh the page, i have lost the
hook of the page also please have a look at this or Guide me
how i can display the client machine folder on a browser and navigate
to its subfolder so that i dont loose te hook of that .aspx page.
Thanks in advance.

function folderdisp(path)

//window.alert("Start :"+ path);

var fso = new ActiveXObject('Scripting.FileSystemObject');

if(fso.FolderExists(path) == true)
document.write ("<html><head>");
document.write ("<br><br><br><br><br>");
document.write ("Files are downloaded to path " +path);
document.write ("<script language=javascript
document.write ("<script language=vbscript
document.write ("</head>");
document.write("<table Border=0 align =left CellPadding=2>" );
document.write("<tr bgcolor= #FFFFCC align =
center><td>"+"FolderName"+"</td>","<td>"+"Ext"+"</td>", "<td>"+"Created
Date"+"</td>", "<td>"+"Size"+"</td></tr>");

var fold = fso.GetFolder(path);

filesArrayString = '';

//Find subfolders
for (subfol = new Enumerator(fold.SubFolders);!subfol.atEnd();
var folname = subfol.item();

var nextfol = path+"/";
//window.alert("nextfol = "+nextfol);
var day,month,year,hrs,min;
DateC = new Date(folname.DateCreated);
day = DateC.getUTCDate();
month = DateC.getUTCMonth()+1;
year = DateC.getUTCFullYear();
hrs = DateC.getUTCHours();
min = DateC.getUTCMinutes();
var DispDate = day + "/" + month + "/" + year+" "+hrs+":"+min;

//window.alert("Here :"+ nextfol);

document.write ("<tr bgcolor= #FFDBCA><td>"+"<A
onClick="+"\""+"folderdisp('"+nextfol+"');"+"\""+" >""</A></td>","<td>Dir</td>","<td>"+DispDate+"</td>","<td>"+folname.Size+"</td></tr>");
window.alert("Folder end");

//Find files
for (files = new Enumerator(fold.files); !files.atEnd();
var thisFile = files.item();
var Fname =".");
var fileDateC = new Date(thisFile.DateLastModified);
var fileday = fileDateC.getUTCDate();
var filemonth = fileDateC.getUTCMonth()+1;
var fileyear = fileDateC.getUTCFullYear();
var filehrs = fileDateC.getUTCHours();
var filemin = fileDateC.getUTCMinutes();

var fileDispDate = fileday + "/" + filemonth + "/" + fileyear +"
"+filehrs+":"+ filemin ;

filepath = path+"/"+Fname[0]+"."+Fname[1];

//document.write ("<tr bgcolor=

//document.write ("<tr bgcolor= #FFCAE4><td><A href='#'
onClick="+"\""+"vbscriptpenArtPDF()"+"\""+">"+Fn ame[0]+"</A></td><td>"+Fname[1]+"</td><td>"+fileDispDate+"</td><td>"+thisFile.Size+"</td></tr>");

document.write ("<tr bgcolor= #FFCAE4><td><A href="+"\""+"#"+"\""+"
onClick="+"\""+"openArtPDF('"+filepath+"');"+"\""+ "

document.write ("</html>");

window.alert("Folder does not exist in local");


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
32bit Program installed to the Program Files folder and not the PFx86 folder Windows 64bit 1 04-30-2009 01:30 PM
Authentication for web clients and Swing clients Francesco Java 1 12-27-2006 03:10 AM
displaying clients machine folder and files Javascript 0 11-30-2005 01:35 PM
Thunderbird or Mozilla email clients - can I set up a "black list"/"white list" to filter all the swen/gibe messages to a holding folder? L Mehl Computer Support 4 09-28-2003 04:56 AM