Batch file for creating folders

March 21, 2011 at 06:29:01
Specs: Windows xp
Hi, I am looking for some batch file help. I am trying to create folders named with %DisplayName% %username% I also need it to assign read/write folder permissions

I am pulling the display name with
for /f "tokens=2*" %%a in ('net user "%Username%" /domain ^| find /i "Full Name"') do set DisplayName=%%b

I want it to pull the %username% from a text file formatted something like "username/username/username", by line or CVS. I do not know the best way for this. I believe it would still need to pull the %displayname% from active directory.
I am thinking it might look something like this. I am very new to batch files.

mkdir %%b %username% FROM TEXT FILE

I want it to set read/write permissions for the %username%. No clue how to do that.

I have already created a batch to map a drive to folder with the naming convention %displayname% %username% now I want to automate the folder creation/file setting a little.

Thanks in advance for any guidance.

See More: Batch file for creating folders

Report •

March 21, 2011 at 08:57:08
Some questions...

What will be in the text file? Give us an example and how it is delimited.

Have you Tried ATTRIB or CACLS to set the folder rights?

These might help you in your quest...

Report •
Related Solutions

Ask Question