Shares multiple folders through a script

  • Thread starter jonny813
  • https://www.osnn.net/admin.php?templates/thread_view.1970/delete&_xfRedirect=https%3A%2F%2Fwww.osnn.net%2Fadmin.php%3Ftemplates%2Foutdated Start date

jonny813

OSNN Addict
Joined
1 Dec 2006
Messages
88
Hey, can anyone give any help in as to how to create a script that will share all folders within a given folder. An example of what I mean would be say in a school where each student has a home folder under their year group, how could I share all these folders individually without having to do soo manually.
I need the script to create a hidden share using the folder name as the share name
Set the share permissions to allow everyone full control
And perhaps disable caching of the folder and its contents

Any help on this would be greatly appreciated.
 

ZeroHour

ho3 ho3 ho3
Joined
22 Mar 2004
Messages
1,118
LOL sorry did not realise. At least others will find the solution too ;)
 

fitz

Woah.. I'm still here?
Political Access
Joined
26 Apr 2004
Messages
4,084
hmm.. how did I miss this thread before - usually the scripting threads catch my eye..

But I would have suggested both the vbs script approach and/or the dos batch approach myself. You could also look at using the rmtshare utility found in the old NT4 resource kit with the batch file approach. It is a little more versitle than "net share" in that you could use it to create the shares remotely.
 

Members online

No members online now.

Latest forum posts

Latest profile posts

Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.
Terrahertz wrote on Electronic Punk's profile.
Yo fellas!
Electronic Punk wrote on Sazar's profile.
Where are you buddy?

Forum statistics

Threads
62,000
Messages
673,429
Members
5,596
Latest member
Joshua Liansky