Batch File To Create Multiple Directories

Hi,

I have around a thousand home area directories that need creating in an Active Directory environment, I would like to create these using a batch file but am unsure how to go about this. Help

Thanks in advance
mogseyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pearl_export_benCommented:
Do the user accounts already exist?

Are you reading in the directories which need creating from text file or another source?

Little more info on your setup and i can modify a script i already have which will do the trick for you :)

Ben
0
DonNetwork AdministratorCommented:
you could let AD do it for you by configuring the path in ADUC

just highlight any number of users>>right click>>properties>>>profile>>>check home folder>>>

and place your path \\yourserver\home\%username%

Then AD will create the folders for you with the correct perms
homefolder.bmp
0
mogseyAuthor Commented:
Yes the accounts already exist.

Basically, we have space issues on one of our clusters and to resolve this I am copying home area data from lets say volume1 to volume2, when that has completed and the users have given the thumbs that all their data is there I will delete the legacy data from volume1.

I am using robocopy to copy the data between volumes which is the reason why I asked the question as robocopy needs a specified directory to copy the data into..

Bit long winded but thats it in a nutshell :o)
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

mogseyAuthor Commented:
The list of user id's are just listed in a single column in excel.
0
DonNetwork AdministratorCommented:
you could use richcopy and copy the whole folder structure over to the new volume


http://technet.microsoft.com/en-us/magazine/2009.04.utilityspotlight.aspx?pr=blog
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mogseyAuthor Commented:
I have downloaded Richcopy as I will certainly use that in the future! It wouldn't be appropriate  in this case as I am not moving the entire volume only a selection of home areas (within the volume) that have been identified as being large but have a justification for being the size they are.

Should of really highlighted this earlier, sorry!
0
DonNetwork AdministratorCommented:
It would work in your case, I would think that you have a "Home" folder on volume1 that has all the user folders. You would then use it to move the home folder to volume2. It's not a "volume" specific utility, it's a file and folder utility. Even robocopy would have done the same. I would have just used either to do the move(they both retain the security) and since it is on the same server you dont have to make any changes for the users except for unsharing the old and then sharing the new.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.