One more question. I am having a hard time with this that I have wrote:
1. @echo off
2. REM Specify object Type and how many objects are to be added
3. Set /P domainName=What is the name of the Domain (.com will be appended)?
4. Set /p ouName=What is the name of the container?
5. Set /p objectType=Specify the object Type (Enter Computer or user):
6. Set /p howMany=How many %objectType%s?
7. REM --------------------------------------------------
8. Rem Iterate through the value set by howMany variable and assign object
name to variables
9. For /l %%B in (1,1,%howMany%) do (Set /p addObject%%B=Enter entry ^#
%%B
10. REM assign object variables to CVS string
11.For /l %%B in (1,1,%howMany%) do echo
"CN=addObject%%B,OU=%ouName%,DC=%domainName%,DC=com" >> C:\%objectType%.txt
My problem is on line 11. On line 9 I have assigned the names to variables
in the for loop. Now I want to plug those names in on line 11 where
CN=addObject but I can't figure out how to access them. I know the syntax I
have there now is wrong, I just left it that way.