Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


800a004c path not found

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,45184
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> 800a004c path not found
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 800a004c path not found - 3/29/2007 2:59:25 AM   
  largeinnit

 

Posts: 2
Score: 0
Joined: 3/29/2007
Status: offline
Hi,

I'm writing a script to go through our AD user list and email when people's home areas are over a certain size. The Script works apart from 2 folders. When tried with 2 users it always returns path not found error.

It's almost as if the FolderExists expression returns true, but then the Folder.size method fails because it can't find the same folder.

Any help much appreciated - couldn't find much info on the web about this, folder permissions seem to be fine.

thanks

user="testuser1"
pathr="\\pc6-7\h$\R_DrivesA\" & user & "h"
pathr2="\\pc6-8\h$\R_DrivesB\" & user &  "h"

Set objFSo = CreateObject("Scripting.FileSystemObject")

WScript.Echo("user id " & user)

If objFSo.FolderExists(pathr) Then
       Wscript.echo(pathr)
       Set objFolder = objFSO.GetFolder(pathr)
       WScript.Echo "Dir Exists in R drives"
       WScript.Echo "Size is " & Gigabyte(objFolder.size) & " GB"
   
   ElseIf objFSo.FolderExists(pathr2) Then
           Wscript.echo(pathr2)
       Set objFolder = objFSO.GetFolder(pathr2)
       WScript.Echo "Dir exists in R drives 2"
       WScript.Echo "Size is " & Gigabyte(objFolder.size) & " GB"

   Else

       WScript.Echo "Dir does not exist"

End If
 
 
Post #: 1
 
 RE: 800a004c path not found - 3/29/2007 3:25:19 AM   
  ebgreen


Posts: 4946
Score: 31
Joined: 7/12/2005
Status: offline
Which specific line does the eror happen on?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to largeinnit)
 
 
Post #: 2
 
 RE: 800a004c path not found - 3/29/2007 7:43:25 PM   
  largeinnit

 

Posts: 2
Score: 0
Joined: 3/29/2007
Status: offline
It crashes out on objFolders.size. The Gigabyte function simply converts bytes to gigabytes, so I can display a more user friendly output. Even if I remove the gigabyte function and just leave objfolder.size it still fails. Alll other users in the "standard systems and users" container work fine. It goes through around 200 user accounts, but crashes out on just 2 folders.

I've done some testing using writeline commands. The paths written to text file are fine, because I can copy and paste then unc paths in drive mappings fine.

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: 800a004c path not found - 3/30/2007 2:13:37 AM   
  dm_4ever


Posts: 2637
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
Permission issue perhaps?

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to largeinnit)
 
 
Post #: 4
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> 800a004c path not found Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts