0

I have a batch file that runs when a JButton is clicked. The contents of the batch file is as follows:

@dsquery computer -name *%1

computerquery.bat FooUser > resultofbatch.txt

I'm having issues saving content to a txt file. The resultofbatch.txt gets created no problem, but it's blank and not saving the cmd prompt results to it. Any suggestions?

Mike Laren
  • 8,028
  • 17
  • 51
  • 70
user6680
  • 79
  • 6
  • 34
  • 78
  • possible duplicate of [Redirecting Output from within Batch file](http://stackoverflow.com/questions/20484151/redirecting-output-from-within-batch-file) – Daniel M. Jun 21 '15 at 11:44
  • That's a post from 2013 from a different user. Any help is appreciated – user6680 Jun 21 '15 at 12:03
  • Yes, that's the point. The question was already answered. I recommend the search function before posting. – Daniel M. Jun 21 '15 at 12:12

0 Answers0