title: How would I make a .bat script to take info from one command output, execute commands for each output, to create a file path?
body: <p>So, what I'm going for, is to execute <code>net user</code> and have only the accounts listed to a .txt file. (This I've done, but the final line "command completed successfully." still outputs.) From there, take each account and check if it's active. (<code>net user [account] | findstr /C:"Account active"</code>). Then make .txt file of those that are. Then simply copy to clipboard the filepath C:\Users(The user found)\AppData\Roaming. If there is a way around making the .txt files that would be great, but I could just end the script by deleting them. The part I'm currently stuck on is getting the 'for' command to collect tokens from all the lines of text not just the last one (and output them.)</p>