PDA

View Full Version : I need a parsed path



jwd
11-07-2005, 10:04 PM
Can anyone tell me how or what to use to get a directory path. I tried using "%THISDIRPATH%" but its not parsed out. example "c:\windows\web" is "c:WindowsWeb". The function I am using requires the path to be just as if you typed it.

jscheuer1
11-08-2005, 05:18 AM
<script type="text/javascript">
var path=location.href.substring(0, location.href.lastIndexOf('/'))
path=/^http/.test(path)? path : path.replace(/\//g, '\\').replace(/^file..../, '')
alert(path)
</script>

jwd
11-08-2005, 06:30 AM
can you explain what your solution is doing... I'm just a beginner in js.

jscheuer1
11-08-2005, 07:13 AM
Since I posted that, I played with it some more in different browsers and got this:


<script type="text/javascript">
/* John Davenport Scheuer */
var path=location.href.substring(0, location.href.lastIndexOf('/'))
if(!/^http/.test(path)){
path=path.replace(/\//g, '\\').replace(/^file..../, '').replace(/^ocalhost./, '')
path=path.charAt(0).toLowerCase()+path.substr(1)
}
alert(path)
</script>

The first line takes the location.href of the page which, when live, is a text string of exactly what is in the address bar and strips off the trailing "/filename.ext" from it using the substring method. It takes the part of the string from the beginning (0) up to but not including the last / (location.href.lastIndexOf('/')). Locally this text string varies among browsers and depending upon how you got to the page. If the page is live we don't need to do anything else to it. If it isn't live (doesn't start with "http", as determined using the test() method) we replace() all /'s with \'s, strip away the typical prefixes (replacing them with nothing), if present, and change the drive letter to lower case by plucking it from what is now the beginning using charAt(0) and toLowerCase(), then add on the rest of the current remaining string using substr(1) - strings begin at 0.

jwd
11-08-2005, 09:41 AM
The application that I'm using is in WebView on a pc, it's not running under a browser, just IE. What I'm trying to do is to add a function that returns the number of files when a folder is selected. I have the Function, what I need is a way to get the path to the current selected folder and pass it to the function. This is the function I am trying to convert:

</script>

<script language="JScript">
function fnFolderObjectItemsJ()
{
var objShell = new ActiveXObject("Shell.Application");
var objFolder = new Object;

objFolder = objShell.NameSpace("C:\\WINDOWS\WEB");
if (objFolder != null)
{
var objFolderItems = new Object;

objFolderItems = objFolder.Items();
return objFolderitems;
}
}
</script>

jscheuer1
11-08-2005, 09:49 AM
it's not running under a browser, just IE

IE generally stands for Internet Explorer. Internet Explorer is a browser. Also, before you said you needed the path in this format:

"c:\windows\web"

Now you are saying that you need:

"C:\\WINDOWS\WEB"

There is a bit of a difference. Taking what you have and blending it with my code:


<script language="JScript">
function fnFolderObjectItemsJ()
{
var path=location.href.substring(0, location.href.lastIndexOf('/'))
if(!/^http/.test(path)){
path=path.replace(/\//g, '\\').replace(/^file..../, '').replace(/^ocalhost./, '')
path=path.charAt(0)+path.charAt(1)+'\\'+path.substr(2)
path=path.toUpperCase()
}


var objShell = new ActiveXObject("Shell.Application");
var objFolder = new Object;

objFolder = objShell.NameSpace(path);
if (objFolder != null)
{
var objFolderItems = new Object;

objFolderItems = objFolder.Items();
return objFolderitems;
}
}
</script>

jwd
11-08-2005, 04:05 PM
I mean explorer (XP).... I'm modifing a .htt templet that runs when you specify "use existing customization templet" on the drop down list in folder properties(customize tab).

jscheuer1
11-08-2005, 05:57 PM
Ah well, I am not very familiar with that type of thing. However, if it truly is JScript, give this a try (note the comment, in green, about quoting the % delimited variable):


<script language="JScript">
function fnFolderObjectItemsJ()
{
var path=%THISDIRPATH% // %THISDIRPATH% may need to be quoted: "%THISDIRPATH%"
path=path.replace(/:/, ':\\').replace(/([A-Z])/g, '\\$1').toUpperCase()

var objShell = new ActiveXObject("Shell.Application");
var objFolder = new Object;

objFolder = objShell.NameSpace(path);
if (objFolder != null)
{
var objFolderItems = new Object;

objFolderItems = objFolder.Items();
return objFolderitems;
}
}
</script>

Also, this will probably not work with directory names that do not start with a letter. There may be other bugs say, in the case where a directory name includes a space character or upper case letters in its name on disk.

jwd
11-09-2005, 12:05 AM
I pasted your function into the htt file and used
data = fnFolderObjectItemsJ();
to call the function, however the contents of data is "undefined". Also you were right about needing quotes arround the %THISDIRPATH%.

jscheuer1
11-09-2005, 07:08 AM
Well, we are now beyond the scope of my knowledge in this area. It would be great if we had a way of seeing what the path variable contained just before it was plugged into:


objFolder = objShell.NameSpace(path);

One thing you should check out, if you haven't already is the MS Windows Shell Reference (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/anch_WinShell.asp). It looks like this is what you are using, as opposed to JScript.

mwinter
11-09-2005, 01:52 PM
objFolder = objShell.NameSpace("C:\\WINDOWS\WEB");Perhaps you've been thinking too much, John. :)

This could simply be a case of a bad string literal. Without something concrete to test, I couldn't say for certain.

To the OP: In JScript, and many other languages, a backslash (\) in string literals is an escape character. Together with subsequent characters, it creates an escape sequence. A common example is 'First line\nSecond line' where \n is translated into a line feed (new line) character. When the character that follows the slash is not considered special, the escape is ignored. For instance, 'win\dows' would become simply 'windows' as 'd' isn't special.

Applying this to the snippet above, "C:\\WINDOWS\WEB" is equivalent to C:\WINDOWSWEB. Escaping the second slash like the first, "C:\\WINDOWS\\WEB" will result in the intended string. Check that this isn't the cause of your problems.

Mike

jwd
11-09-2005, 03:08 PM
I think we are making some progress. The only way I have to see the contents of any varable is to insert the following line:

document.write (path);

What I did was to insert this before and after the path variable changes;

var path="%THISDIRPATH%"
document.write (path);
path=path.replace(/:/, ':\\').replace(/([A-Z])/g, '\\$1').toUpperCase()
document.write (path);

The Results were

C:Documents and SettingsOwnerDesktopNew Folder
\C:\\DOCUMENTS AND \SETTINGS\OWNER\DESKTOP\NEW\FOLDER

what I didn't realize is that the document.write doesn't print some special characters. Your translate makes that apparent. For testing purposes I guess I need a command that would print all characters.

I also inserted the line after...

objFolder = objShell.NameSpace(path);
document.write (objFolder);

the result was 'null'.
I don't know why the function doesn't work. I have been using the Microsoft references... They just don't seem to work, Since the Jscript that I'm modifing is the original Folder.htt document from windows98 I think its a little odd. I must be doing something wrong or there must be something else required to use the functions (microsoft examples). However the following function does work (their example);

<script language="JScript">
function fnFolderObjectItemsJ()
{
var objShell = new ActiveXObject("Shell.Application");
var objFolder = new Object;

objFolder = objShell.NameSpace("C:\\WINDOWS");
if (objFolder != null)
{
var objFolderItems = new Object;

objFolderItems = objFolder.Items();
if (objFolderItems != null)
{
document.write (objFolderItems.Count);
}
}
}
</script>

It does return the number of items in the windows directory. I think if I can get the translate right I can pass the path as a var to this function to get the result I want. I'm not familiar with your method, I will have to use string functions.

jwd
11-09-2005, 03:15 PM
--------------------------------------------------------------------------------

I think we are making some progress. The only way I have to see the contents of any varable is to insert the following line:

document.write (path);

What I did was to insert this before and after the path variable changes;

var path="%THISDIRPATH%"
document.write (path);
path=path.replace(/:/, ':\\').replace(/([A-Z])/g, '\\$1').toUpperCase()
document.write (path);

The Results were

Cocuments and SettingsOwnerDesktopNew Folder
\C:\\DOCUMENTS AND \SETTINGS\OWNER\DESKTOP\NEW\FOLDER

what I didn't realize is that the document.write doesn't print some special characters. Your translate makes that apparent. For testing purposes I guess I need a command that would print all characters.

I also inserted the line after...

objFolder = objShell.NameSpace(path);
document.write (objFolder);

the result was 'null'.
I don't know why the function doesn't work. I have been using the Microsoft references... They just don't seem to work, Since the Jscript that I'm modifing is the original Folder.htt document from windows98 I think its a little odd. I must be doing something wrong or there must be something else required to use the functions (microsoft examples). However the following function does work (their example);

<script language="JScript">
function fnFolderObjectItemsJ()
{
var objShell = new ActiveXObject("Shell.Application");
var objFolder = new Object;

objFolder = objShell.NameSpace("C:\\WINDOWS");
if (objFolder != null)
{
var objFolderItems = new Object;

objFolderItems = objFolder.Items();
if (objFolderItems != null)
{
document.write (objFolderItems.Count);
}
}
}
</script>

It does return the number of items in the windows directory. I think if I can get the translate right I can pass the path as a var to this function to get the result I want. I'm not familiar with your method, I will have to use string functions.

jwd
11-09-2005, 03:17 PM
sorry getting some kind of editor error. the results line should be

C:Documents and SettingsOwnerDesktopNew Folder

\C:\\DOCUMENTS AND \SETTINGS\OWNER\DESKTOP\NEW\FOLDER

jwd
11-09-2005, 03:18 PM
don't know where that smiley face is comming from

jscheuer1
11-09-2005, 03:27 PM
Perhaps you've been thinking too much, John. :)

Yes, and testing too little, here and elsewhere of late. In this particular case, I am at a loss as to how to test but, the OP has found a way and it looks like:


This could simply be a case of a bad string literal. Without something concrete to test, I couldn't say for certain.

Could very well be in play. However, the ideal solution would be to turn off JScript's parsing of the \ temporarily as the 'bad literal' is itself a shell variable over which there is not the type of control one would have over an actual literal, is there a way to do that?

The only other alternative I can think of is to devise a better regex translation scheme, as the OP seems to want at this point.

jscheuer1
11-09-2005, 03:34 PM
don't know where that smiley face is comming from

Look down below the editor, there is a checkbox for 'Disable smilies in text'.

mwinter
11-09-2005, 04:02 PM
[...] the 'bad literal' is itself a shell variable over which there is not the type of control one would have over an actual literal, is there a way to do that?To be honest, I wouldn't have thought it to be necessary. I would expect it to be possible to obtain the current directory though the API. I suspect that the macros are intended for use in the template markup, only.

For instance, if the OP has a WebViewFolderContents/ShellFolderView object



<object id="files" classid="clsid:1820FED0-473E-11D0-A96C-00C04FD705A2"></object>
then it would have a Folder property that references a Folder object for that view. I presume that the Title property of a Folder object is its path.

Again, it's difficult to be certain.

Mike

jwd
11-09-2005, 05:02 PM
Here is the original windows98 Folder.htt file. The routines we are currently discussing have been added between the ----------------------- comment lines to make them easy to find. I've had to break the file into two post because its to long. Any Ideas as to why the routine comes back null


<!--
* This file was automatically generated by Microsoft Internet Explorer 4.0
* using the file %THISDIRPATH%\folder.htt (if customized) or
* %TEMPLATEDIR%\folder.htt (if not customized).
-->

<html>
<style>
body {font: 8pt/10pt verdana; margin: 0}
#FileList {position: absolute; left: 30%; width: 70%; height: 100%}
#Media {margin-left: 15px}
#Panel {position: absolute; width: 30%; height: 100%; overflow: auto}
#PieChart {width: 100px; height: 50px; margin-top: 10px}
#Thumbnail {width: 160px; height: 160px; margin-top: 0px}
#Status {margin-left: 15px}
#Brand {position: absolute; left: 30%; width: 70%; height: 100%; overflow: auto}
p {margin-left: 15px; margin-top: 15px; margin-right: 15px}
p.Title {font: 16pt; font-weight: bold; margin-top: 5px}
p.LogoLine {margin-left: 0; margin-top: -5px; margin-right: 0; margin-bottom: 20px}
p.Warning {font-weight: bold; color: red}
p.Links {margin-top: 5px}
a.Command {font-weight: bold}
div.Release {width: 160px; text-align: right; background: buttonface; padding: 0px, 8px, 4px, 8px}
</style>

<head>
<!-- allow references to any resources you might add to the folder -->
<!-- (a "webbot" is a special wrapper for FrontPage compatibility) -->
<!-- webbot bot="HTMLMarkup" tag="base" startspan -->
<base href="%THISDIRPATH%\">
<!-- webbot bot="HTMLMarkup" endspan -->

<script language="JavaScript">
var L_Prompt_Text = "Select an item to view its description.";
var L_Multiple_Text = " items selected.";
var L_Size_Text = "Size: ";
var L_FileSize_Text = "Total File Size: ";
var L_Delimiter_Text = ",";
var L_Bytes_Text = "&nbsp;bytes";
var L_Attributes_Text = "Attributes";
var L_Codes_Text = "RHSaCE"; // suppress the Archive flag
var L_ReadOnly_Text = "Read-only";
var L_Hidden_Text = "Hidden";
var L_System_Text = "System";
var L_Archive_Text = "Archive";
var L_Compressed_Text = "Compressed";
var L_Encrypted_Text = "Encrypted";
var L_NoAttributes_Text = "(normal)";
var L_Properties_Text = "P&roperties";
var timer = 0;
var wantMedia = false; // cool, but may hinder media file manipulation

function FixSize() {
// this function handles fixed panel sizing and collapsing when the window resizes
var threshold = 400;
var miniHeight = 32;
var ch = document.body.clientHeight;
var cw = document.body.clientWidth;

if (cw < threshold) {
document.all.Panel.style.visibility = "hidden";
document.all.MiniBanner.style.visibility = "visible";
document.all.FileList.style.top = miniHeight;
document.all.FileList.style.pixelLeft = 0;
} else {
document.all.MiniBanner.style.visibility = "hidden";
document.all.Panel.style.visibility = "visible";
document.all.FileList.style.top = 0;
document.all.FileList.style.pixelLeft = document.all.Panel.style.pixelWidth;
}
document.all.FileList.style.pixelWidth = cw - document.all.FileList.style.pixelLeft;
document.all.FileList.style.pixelHeight = ch - document.all.FileList.style.pixelTop;
}

function FormatNumber(n) {
var t = "";
var i, j = 0;
for (i = n.length - 1; i >= 0; i--) {
t = n.charAt(i) + t;
if (i && ((++j % 3) == 0))
t = L_Delimiter_Text + t;
}
return t;
}

function Properties() {
FileList.SelectedItems().Item(0).InvokeVerb(L_Properties_Text);
}

function Init() {
// call our FixSize() function whenever the window gets resized
window.onresize = FixSize;
FixSize();
Info.innerHTML = L_Prompt_Text;
}
</script>

<!---------------------------------------------------------------------------------->
<script language="JScript">
function fnFolderObjectItemsJ()
{
var path="%THISDIRPATH%" // %THISDIRPATH% may need to be quoted: "%THISDIRPATH%"

path=path.replace(/:/, ':\\').replace(/([A-Z])/g, '\\$1').toUpperCase()

var objShell = new ActiveXObject("Shell.Application");
var objFolder = new Object;

objFolder = objShell.NameSpace(path);
document.write (objFolder);
if (objFolder != null)
{
var objFolderItems = new Object;

objFolderItems = objFolder.Items();
return objFolderitems;
}
}
</script>
<!---------------------------------------------------------------------------------->


<script language="JavaScript" for="FileList" event="SelectionChanged">
// this script updates the left info panel when you select icons
var fldr = FileList.Folder;
var items;
var name;
var data;
var text;
var title;
var size = 0;
var i;

// cancel any pending status message
if (timer) {
window.clearTimeout(timer);
timer = 0;
}

// erase any visible thumbnail since the selection changed
document.all.Thumbnail.style.display = "none";
document.all.Status.style.display = "none";

// stop & destroy any media player
if (wantMedia)
document.all.Media.innerHTML = "";

data = FileList.SelectedItems().Count;
if (data == 0) {
// nothing selected?
Info.innerHTML = L_Prompt_Text;
return;
}
else if (data > 1) {
// more than one item selected?
text = data + L_Multiple_Text + "<br>";
if (data <= 100) {
for (i = 0; i < data; i++)
size += FileList.SelectedItems().Item(i).Size;
if (size)
text += "<br>" + L_FileSize_Text + FormatNumber(size.toString()) + L_Bytes_Text + "<br>";
if (data <= 16)
for (i = 0; i < data; i++)
text += "<br>" + FileList.SelectedItems().Item(i).Name;
}
Info.innerHTML = text;
return;
}

items = FileList.SelectedItems().Item(0);

// name
name = fldr.GetDetailsOf(items, 0);
text = "<b>" + name + "</b>";

// type
data = fldr.GetDetailsOf(items, 2);
if (data)
text += "<br>" + data;

//-----------------------------------------------------------------------------------------------------------------------------------
// If the type is a Folder
if (data == "File Folder") {



data = fnFolderObjectItemsJ();
//

text += "<br>" + "Number of Items in File " + data;
}


//-----------------------------------------------------------------------------------------------------------------------------------

// date
data = fldr.GetDetailsOf(items, 3);
if (data)
text += "<br><br>" + fldr.GetDetailsOf(null, 3) + ":<br>" + data;

// size
size = FileList.SelectedItems().Item(0).Size;
if (size && size < 1000)
text += "<br><br>" + L_Size_Text + size + L_Bytes_Text;
else {
data = fldr.GetDetailsOf(items, 1);
if (data)
text += "<br><br>" + fldr.GetDetailsOf(null, 1) + ": " + data;
else if (size)
text += "<br><br>" + L_Size_Text + FormatNumber(size.toString()) + L_Bytes_Text;
}

jwd
11-09-2005, 05:03 PM
// extra details?
for (i = 4; i < 10; i++) {
title = fldr.GetDetailsOf(null, i);
if (!title)
break;
data = fldr.GetDetailsOf(items, i);
if (title == L_Attributes_Text) {
var code;
var s = "";

text += "<br><br>" + title.link("JavaScript:onClick=Properties()") + ": ";
for (i = 0; i < 6; i++) {
code = L_Codes_Text.charAt(i);
if (data.indexOf(code) > -1) {
if (s)
s += ", ";
if (i == 0)
s += L_ReadOnly_Text;
else if (i == 1)
s += L_Hidden_Text;
else if (i == 2)
s += L_System_Text;
else if (i == 3)
s += L_Archive_Text;
else if (i == 4)
s += L_Compressed_Text;
else if (i == 5)
s += L_Encrypted_Text;
}
}
if (!s)
s = L_NoAttributes_Text;
text += s;
}
else if (data)
text += "<br><br>" + title + ":<br>" + data;
}

// tip?
data = fldr.GetDetailsOf(items, -1);
if (data && data != name) {
var start;
var end;
var theLink;
var a;

// parse lines for Office files without breaking links below
a = data.split("\n");
data = a.join("<br>\n");

// look for embedded links
text += "<br><br>";
start = data.indexOf("http://");
if (start < 0)
start = data.indexOf("file://");
if (start < 0)
text += data;
else {
end = data.indexOf(" ", start);
if (end < 0)
end = data.length;
if (start > 0)
text += data.substring(0, start - 1);
theLink = data.substring(start, end);
text += theLink.link(theLink);
if (end < data.length)
text += data.substring(end + 1, data.length);
}
}

// replace Info with the new text
Info.innerHTML = text;

if (wantMedia && size) {
// show media preview or thumbnail based on file extension
ext = name.substring(name.lastIndexOf(".") + 1, name.length);
ext = ext.toLowerCase();
if (ext == 'avi' || ext == 'mov' || ext == 'qt' || ext == 'mpe' || ext == 'mpeg' || ext == 'mpg') {
// show a movie player
document.all.Media.innerHTML = '<object ID="Player" style="width: 160px; height: 148px" classid=clsid:05589FA1-C356-11CE-BF01-00AA0055595A><param name="FileName" value="' + items.Path + '"><param name=ShowDisplay value=0><param name=BorderStyle value=0></object>';
} else if (ext == 'aif' || ext == 'aifc' || ext == 'aiff' || ext == 'au' || ext == 'mid' || ext == 'rmi' || ext == 'snd' || ext == 'wav') {
// show a sound player
document.all.Media.innerHTML = '<object ID="Player" style="width: 160px; height: 28px" classid=clsid:05589FA1-C356-11CE-BF01-00AA0055595A><param name="FileName" value="' + items.Path + '"><param name=ShowDisplay value=0></center></object>'
}
}

// try to generate a new thumbnail asynchronously, and delay the status message one second
if (size && (size < 10000000) && Thumbnail.displayFile(items.Path))
timer = window.setTimeout('document.all.Status.style.display = ""', 1000);
</script>

<script language="JavaScript" for="Thumbnail" event="OnThumbnailReady">
// when a valid thumbnail has been generated, display it
window.clearTimeout(timer);
timer = 0;
document.all.Status.style.display = "none";
if (document.all.Thumbnail.haveThumbnail() && document.all.Media.innerHTML == "")
document.all.Thumbnail.style.display = "";
</script>
</head>

<body scroll=no onload="Init()">

<!-- start mini banner -->
<div ID="MiniBanner" style="visibility: hidden; position: absolute; width: 100%; height: 32px; background: window">
<!-- using a table with nowrap to prevent word wrapping -->
<table><tr><td nowrap>
<p class=Title style="margin-top: 0">
<!--webbot bot="HTMLMarkup" startspan alt="&lt;B&gt;&lt;I&gt;Web View Folder Title&lt;/I&gt;&lt;/B&gt;&nbsp;" -->
%THISDIRNAME%
<!--webbot bot="HTMLMarkup" endspan -->
</td></tr></table>
</div>
<!-- end mini banner -->

<!-- start left info panel -->
<div id=Panel style="background: white URL(file://%TEMPLATEDIR%\wvleft.bmp) no-repeat">
<p>
<object classid="clsid:E5DF9D10-3B52-11D1-83E8-00A0C90DC849" width=32 height=32>
<param name="scale" value=100>
</object>

<p class=Title>
<!--webbot bot="HTMLMarkup" startspan alt="&lt;B&gt;&lt;I&gt;Web View Folder Title&lt;/I&gt;&lt;/B&gt;&nbsp;" -->
%THISDIRNAME%
<!--webbot bot="HTMLMarkup" endspan -->

<p class=LogoLine>
<img src="%TEMPLATEDIR%\wvline.gif" width=100% height=1px>

<p>
<span id=Info>
</span>

<!-- HERE'S A GOOD PLACE TO ADD A FEW LINKS OF YOUR OWN -->
<!-- (examples commented out)
<p>
<br>
<a href="http://www.mylink1.com/">Custom Link 1</a>
<p class=Links>
<a href="http://www.mylink2.com/">Custom Link 2</a>
-->

<p>
<!-- this is the thumbnail viewer control -->
<object id=Thumbnail classid="clsid:1D2B4F40-1F10-11D1-9E88-00C04FDCAB92" style="display: none">
</object>

<!-- this is the status message that pops up during thumbnail generation -->
<div id=Status style="display: none">
Generating preview...
</div>

<p>
<!-- this contains any ActiveMovie control created later -->
<div id=Media>
</div>

</div>
<!-- end left info panel -->

<!-- this is the standard file list control -->
<!-- webbot bot="HTMLMarkup" startspan -->
<object id=FileList border=0 tabindex=1 classid="clsid:1820FED0-473E-11D0-A96C-00C04FD705A2">
</object>
<!-- webbot bot="HTMLMarkup" endspan -->

</body>
</html>

mwinter
11-09-2005, 08:40 PM
As I suggested, you shouldn't need to worry about using the %THISDIRPATH% value.

By the way, when posting code, please wrap it in the
items = FileList.SelectedItems().Item(0);[/quote]As I understand this code (part of the original), items is a reference to a FolderItem object - a selected item in Explorer that can be a file, directory, drive, etc. Assuming that you want information about that, then it seems to me that


// If the type is a Folder
if (data == "File Folder") {

data = fnFolderObjectItemsJ();

text += "<br>" + "Number of Items in File " + data;
}could be replaced with:

[code]
if(items.IsFolder()) {
text += '<br>Number of Items in File ' + items.GetFolder().Items().Count;
}
rendering your function unnecessary.

As this seems to be a pre-XP mechanism, I still can't check.

Mike

jwd
11-09-2005, 11:06 PM
Inserted your line of code into the file and tried it and got a "Object doesn't support this property or method" error code 0.



if(items.IsFolder()) {
text += '<br>Number of Items in File ' + items.GetFolder().Items().Count;
}

jwd
11-10-2005, 12:16 AM
There is additional information on WebView for XP at this site

http://www.virtualplastic.net/html/wv_main.html

If anyone is interested. The windows 98 program to enable webview in xp is IESHWIZ.exe which can be found on the internet. There are three patchs that are needed to Allow Legacy WebView. The patches can be found at the web site above.

mwinter
11-11-2005, 07:38 PM
I don't like forwarding people elsewhere for help, but it would seem to be better, for you, if you did ask this question in a Microsoft-specific group. You might want to start in microsoft.public.platformsdk.shell on Usenet or the Web-based interface (http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.platformsdk.shell&lang=en&cr=US) (you'll need a .NET Passport).

Tell them what you want to achieve and ask how to go about it. Try to give as complete a description as possible. Don't just post a load of code and ask what's wrong unless someone asks to see what you've tried so far. Later, once you have your answer, you can ask why what you thought should work, didn't.

Good luck,
Mike

jwd
11-11-2005, 07:54 PM
Thanks for the info. I've been able to achieve a partial success, I stumbled on to the fact that my edit routine for the path will not work if any of the folder names contain a space (ie; Documents and Settings). It works for any path on the C: drive that doesn't contain spaces. However, if the path is on a drive other that C:, the %THISDIRPATH% varable doesn't contain the selected folder. Only the parent folders. Any Ideas?

mwinter
11-11-2005, 08:29 PM
However, if the path is on a drive other that C:, the %THISDIRPATH% varable doesn't contain the selected folder. Only the parent folders. Any Ideas?Sorry, but no.

I've never really had experience with the Shell even when I did work with Win32.

Mike

jwd
11-11-2005, 08:44 PM
I suppose I can do a work arround for paths on other drives. The FileList.Folder object gives me the name of the selected folder so I can just append the the folder name to the path.

I haven't a clue as to why blanks in a folder name screw up the "objFolder = objShell.NameSpace(Path);" retrieval.