[Technic] folder creation scripts
Don Wright
dwright at hdnet.k12.mo.us
Tue Aug 7 09:20:51 CDT 2007
Here is the batch file I use, you will have to modify the folder names.
Newuser.bat
e:
cd \users
NET SHARE %1$=E:\users\%1 /GRANT:%1,CHANGE
CACLS %1 /t /c /g "DOMAIN ADMINS":F ADMINISTRATORS:F %1:C <"y.txt"
Download unixtools for windows: http://unxutils.sourceforge.net/
Then run ls -w 1 > directorylist.txt
This creates a text file of all of the folders you need to create shares
for (provided they are all in one place).
Import into excel and create a formula such as: ="newuser.bat "&A1
Then copy the column with the new formula to a batch file.
If you had jdoe in column A1 then the result would look like newuser.bat
jdoe.
Also, create a file called y.txt that only contains the letter y in it.
This will automatically answer yes to any prompts.
Hope this helps and is not too confusing.
Don
From: technic-bounces at lists.more.net
[mailto:technic-bounces at lists.more.net] On Behalf Of Andy Hall
Sent: Tuesday, August 07, 2007 9:08 AM
To: Public School &Library Tech. Support Forum
Subject: [Technic] folder creation scripts
Does anyone have a script that will make a set of folders on a Windows
2003 server, reading the folder names and who should be owners from an
external file of some kind? Have a situation where I have a whole slug
of folders based on usernames in a location other than their home
directory, and I'm struggling with the best way to get this done without
hand-typing 500+ names and setting permissions on each one....
Thanks in advance.
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.more.net/archives/technic/attachments/20070807/a894483a/attachment.htm
More information about the Technic
mailing list
|