Code: cmd /C "net localgroup > C:\gList.txt\" Try removing the last (Bold red) backslash and then run the command
cmd /C "net localgroup > C:\gList.txt\"