objFolder.Size not finding correct path. 
Author Message
 objFolder.Size not finding correct path.

Thank you in advance for your help.

When I run a simple script to determine the size of a folder, it works
perfectly, but when I incorporate it into my project is can't find the
path. I have printed the path to screen and it's 100% correct.

Below are examples of what I am talking about.

1. This one works.
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("C:\Inetpub\wwwlogs\w3SVC64")

2. This one does not.
Set objFSO2 = CreateObject("Scripting.FileSystemObject")
locallogs = "C:\Inetpub\wwwlogs\w3SVC"
LogPathVr = locallogs & IISObjectIP.name
wscript.echo LogPathVr    
'----- It works to this point and displays the correct path.
'----- The following line kills it.
Set objsitemb = objFSO2.GetFolder(LogPathVr)

Any ideas?

Thanks.
JJ



Tue, 20 Sep 2005 00:28:24 GMT  
 objFolder.Size not finding correct path.
I've tried everything that I can think of. It's strange that it's
strange that it works in the simple script not in the ohter.
Any ideas?


Wed, 21 Sep 2005 19:46:48 GMT  
 objFolder.Size not finding correct path.

Quote:

> I've tried everything that I can think of. It's strange that it's
> strange that it works in the simple script not in the ohter.
> Any ideas?

John,

Just a guess - try

    wscript.echo len(LogPathVr)

and see if it comes out to the correct length.  It's possible there are
some terminal nonvisible characters such as a null being left in that
string by the IISObjectIP.name method call.  Not an everyday problem, but
it happens occasionally with some COM objects where someone didn't clean
the string correctly.

--
Please respond in the newsgroup so everyone may benefit.
 http://dev.remotenetworktechnology.com
(email requests for support contract information welcomed)
 ----------
 Microsoft's new UNIFIED Terminal Services Newsgroup:



Thu, 22 Sep 2005 23:52:24 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Long Path Names give Runtime error 76 - Path not found

2. Long Path Names give Runtime error 76 - Path not found

3. Finding Correct Path

4. Size After Minimize Not Correct (Half-Height)?????????

5. VBScript Path Not Found Error when running in IIS

6. GetFolder - Path Not Found

7. GetFolder gives me PATH not found

8. Path not found in W95

9. Path not found error??

10. Path not found

11. Path Not found on Get Folder

12. Path Not Found on Get Folder Object

 

 
Powered by phpBB® Forum Software