I have a script that I am writing and I am stuck..... My script lists all of the profiles in the C:\Users folder then exports the list to a text file and the output looks like this:
USER1
USER2
USER3
USER4
I thought I knew enough to make a quick line in the script that will read the file and assign each a variable Ex:
%User1%
%User2%
and so on for everyone in the list.
I use this to get the users from the display:
for /f "tokens=5" %%a in (C:\Temp\folders.txt) do set word3=%%a > "C:\Temp\Test.txt"
pause
But not sure how to get the %User1% to >>C:\Temp\Users.txt It comes out blank.
Any help would be appreciated