Error 76 Path not found with folder object 
Author Message
 Error 76 Path not found with folder object

I am getting this error when trying to access the .size property of a
folder object.  Documentation that I have read indicates that this is
because the folder is the root of the drive, but that does not seem to
be the case.  Here's my code:

set rootfolder = fso.getfolder("\\shareserver\i$\rd\oem_engineering")
msgbox rootfolder.size

Strange thing is that this did not do this previously.  This snippet
is part of a script that is run regularly to capture stats on shares
on a server.  This does not happen with other shares (178) on this
machine, just this one in particular.  

There are 21 folders and no files in this folder.  Is there something
else I should be looking at?  

Thanks for your help.



Wed, 24 Nov 2004 05:03:36 GMT  
 Error 76 Path not found with folder object
David,

I can't reproduce this with an empty (besides other folders) folder.

Could you do a dir from the command line on that path?  Something like:

dir /s \\shareserver\i$\rd\oem_engineering

I am wondering if someone may have created a subfolder that is nested too
deeply; if so, you should get an error back from a dir command.


Quote:
> I am getting this error when trying to access the .size property of a
> folder object.  Documentation that I have read indicates that this is
> because the folder is the root of the drive, but that does not seem to
> be the case.  Here's my code:

> set rootfolder = fso.getfolder("\\shareserver\i$\rd\oem_engineering")
> msgbox rootfolder.size

> Strange thing is that this did not do this previously.  This snippet
> is part of a script that is run regularly to capture stats on shares
> on a server.  This does not happen with other shares (178) on this
> machine, just this one in particular.

> There are 21 folders and no files in this folder.  Is there something
> else I should be looking at?

> Thanks for your help.



Wed, 24 Nov 2004 09:56:16 GMT  
 Error 76 Path not found with folder object

Quote:
>David,

>I can't reproduce this with an empty (besides other folders) folder.

>Could you do a dir from the command line on that path?  Something like:

>dir /s \\shareserver\i$\rd\oem_engineering

>I am wondering if someone may have created a subfolder that is nested too
>deeply; if so, you should get an error back from a dir command.

Alex,
I tried running the dir and it did not raise any errors (I think,
since it whizzed by and did not stop with an error message).  There
was 8.4 GB, 42,912 files, and 30,379 folders.  Is there a size
limitation that might be causing this?


Mon, 29 Nov 2004 00:45:09 GMT  
 Error 76 Path not found with folder object
I can't see size causing an issue with this.  It's the GetFolder line that
throws the error?


Quote:

> >David,

> >I can't reproduce this with an empty (besides other folders) folder.

> >Could you do a dir from the command line on that path?  Something like:

> >dir /s \\shareserver\i$\rd\oem_engineering

> >I am wondering if someone may have created a subfolder that is nested too
> >deeply; if so, you should get an error back from a dir command.

> Alex,
> I tried running the dir and it did not raise any errors (I think,
> since it whizzed by and did not stop with an error message).  There
> was 8.4 GB, 42,912 files, and 30,379 folders.  Is there a size
> limitation that might be causing this?



Mon, 29 Nov 2004 16:40:47 GMT  
 Error 76 Path not found with folder object
Alex,
It isn't the getfolder method that is burping.  If I pull the .path or
.files.count property of the folder object (on this particular path),
it is fine.  When I try to get the .size, it takes several minutes
before it coughs.  How does the .size work?  If it is doing a
recursive search, maybe I could write something that would show me
where it is {*filter*}.

Thanks.

On Thu, 13 Jun 2002 03:40:47 -0500, <Alex K. Angelopoulos (MVP)>

Quote:
>I can't see size causing an issue with this.  It's the GetFolder line that
>throws the error?




>> >David,

>> >I can't reproduce this with an empty (besides other folders) folder.

>> >Could you do a dir from the command line on that path?  Something like:

>> >dir /s \\shareserver\i$\rd\oem_engineering

>> >I am wondering if someone may have created a subfolder that is nested too
>> >deeply; if so, you should get an error back from a dir command.

>> Alex,
>> I tried running the dir and it did not raise any errors (I think,
>> since it whizzed by and did not stop with an error message).  There
>> was 8.4 GB, 42,912 files, and 30,379 folders.  Is there a size
>> limitation that might be causing this?



Mon, 29 Nov 2004 21:58:14 GMT  
 Error 76 Path not found with folder object


I wrote a script to go through the subfolders, get the .size property
and then write out the path if the 76 error was raised.  I then
appended the path and I ran the getfolder on the folder that
previously raised the error.  I got pretty far down the tree and then
checked the path in WinExplorer.  When I got to this path:

\\shareserver\I$\rd\OEM_Engineering\Validation\Reliability Test
Programs\4094 Amplifier\Original OMS Data (4094)\4085 Amp - Computer
1\4094_ran vib1-b run1 lat._bergiton\4094_ran vib1-b run 1
vert_bergiton\September_05_2001_20H_41M_14S

It would not let me access it through Explorer and complained "can't
access this folder  Path is too long".  Word tells me this path has
236 characters with spaces.  I thought it would start complaining
around 256.  Any ideas?

Thanks



Mon, 29 Nov 2004 22:33:36 GMT  
 Error 76 Path not found with folder object

Quote:
> It would not let me access it through Explorer and complained "can't
> access this folder  Path is too long".  Word tells me this path has
> 236 characters with spaces.  I thought it would start complaining
> around 256.  Any ideas?

Try creating a temporary drive mapping to at least the share point (or deeper if running on an OS that supports it).  That will shorten the length of the file names.

set fso = createobject("scripting.filesystemobject")
set net = createObject("wscript.network")
fd = freedrive()
net.mapnetworkdrive fd,"\\shareserver\i$\rd\oem_engineering"
set z = fso.getfolder(fd)
msgbox z.size
net.removenetworkdrive fd

wscript.quit

function freedrive()
  dim i
  'assumes fso is global...
  for i = asc("d") to asc("z")
    if not fso.driveexists(chr(i)) then
      freedrive = chr(i) & ":"
      exit function
    end if
  next
end function

--
Michael Harris
Microsoft.MVP.Scripting
Seattle WA US
--



Tue, 30 Nov 2004 00:14:20 GMT  
 
 [ 7 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. 76 means to be "Path not found

4. Access97, Win95 Error 76 Path error 99

5. Path Not Found on Get Folder Object

6. Mysterious path not found error 76 , caused by P&D? (vb6)

7. Path Not found on Get Folder

8. VBScript Path Not Found Error when running in IIS

9. Path not found error??

10. VBScript Path Not Found Error when running in IIS

11. Page object, produces error Object Not Found ...

12. Path not found error??

 

 
Powered by phpBB® Forum Software