|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.