Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Find whether a folder is shared?

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Find whether a folder is shared?
  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 >>
 Find whether a folder is shared? - 5/20/2007 4:15:02 PM   
  vijaye82

 

Posts: 11
Score: 0
Joined: 4/24/2007
Status: offline
Hi All,

Can anyone pls help me in finding whether a folder is shared or not using VBScript. i got struck with it.


Thanks to All.

Regards,
Vijay
 
 
Post #: 1
 
 RE: Find whether a folder is shared? - 5/20/2007 6:34:45 PM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline

      

Ucase is necessary because it seems that objShare.Path is case-sensitive.

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to vijaye82)
 
 
Post #: 2
 
 RE: Find whether a folder is shared? - 5/20/2007 6:34:46 PM   
  gdewrance


Posts: 587
Score: 3
Joined: 3/16/2006
Status: offline
this will show you all shares on a computer


      

This will show shares and there Paths

      

(in reply to vijaye82)
 
 
Post #: 3
 
 RE: Find whether a folder is shared? - 5/20/2007 8:11:50 PM   
  vijaye82

 

Posts: 11
Score: 0
Joined: 4/24/2007
Status: offline
Hi,

Thanks for your reply. This works fine.

But, i need to get the shares from a specific drive. So, instead of taking "strComputer" as input, Is there any way to pass the drive and get the shared folders of that drive. Not necessarily search the entire local drives.

Thanks for your help.

Regards,
Vijay

(in reply to ginolard)
 
 
Post #: 4
 
 RE: Find whether a folder is shared? - 5/20/2007 10:57:15 PM   
  ginolard


Posts: 1082
Score: 21
Joined: 8/10/2005
Status: offline

      

_____________________________

Author of ManagePC - http://managepc.net
AD Query Template - http://www.visualbasicscript.com/m_40609/tm.htm
Consolidated Scripting Framework - http://www.visualbasicscript.com/m_59109/tm.htm

(in reply to vijaye82)
 
 
Post #: 5
 
 RE: Find whether a folder is shared? - 5/21/2007 2:55:34 PM   
  vijaye82

 

Posts: 11
Score: 0
Joined: 4/24/2007
Status: offline
Hi Ginolard,



Thanks for your help. This is exactly what i expected. Its working and my script is completed.

Thanks again.

Thanks to All.

Regards,
Vijay

(in reply to ginolard)
 
 
Post #: 6
 
 RE: Find whether a folder is shared? - 5/24/2007 2:19:34 AM   
  vijaye82

 

Posts: 11
Score: 0
Joined: 4/24/2007
Status: offline
Hi,

I have a folder,say 'C:/Scripts'. I need to find whether that folder is shared or not.

Can anyone provide help please.

Thanks,
Vijay

(in reply to ginolard)
 
 
Post #: 7
 
 RE: Find whether a folder is shared? - 5/24/2007 2:23:47 AM   
  ebgreen


Posts: 5250
Score: 31
Joined: 7/12/2005
Status: offline
It appears that you have working code to find all of the shares on a specified drive. Why not just get the shares on C: then see if \Scripts is in the list?

_____________________________

"... 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 vijaye82)
 
 
Post #: 8
 
 RE: Find whether a folder is shared? - 5/24/2007 6:27:15 PM   
  vijaye82

 

Posts: 11
Score: 0
Joined: 4/24/2007
Status: offline
Hi,

I tried with that option too. But,

I need to search a network share which contains 2 shares say ' share1' and 'share2'. Each contains many shares in it. I need to search both the shares to get the folder which is not shared.

Could you please tell me the best solution to complete the task.

I trying to loop through each folder in both the shares and trying to find whether that folder is shared or not.

Kindly, tell me am i proceeding in the right way or is there any other way to proceed.


Thanks,
Vijay

(in reply to ebgreen)
 
 
Post #: 9
 
 
 
  

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 >> Find whether a folder is shared? 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