Search found 7 matches

by tds1973lbp
07 Feb 2017 02:16
Forum: DOS Batch Forum
Topic: CMD / Batch file: Creating an output/log file on a network share doesn't work
Replies: 4
Views: 4467

Re: CMD / Batch file: Creating an output/log file on a network share doesn't work

That's it. No CMD problem. It is WMI. You can't open a WMI session and then make another connect from the remote system to a third system. It is forbidden.
by tds1973lbp
06 Feb 2017 03:20
Forum: DOS Batch Forum
Topic: CMD / Batch file: Creating an output/log file on a network share doesn't work
Replies: 4
Views: 4467

Re: CMD / Batch file: Creating an output/log file on a network share doesn't work

Hello Squashman, sorry - yes, after some tests I can confirm that the problem is not the CMD command generally. I start the command remote - via WMI. I made some tests. Result is: Make the remote system starting the the CMD command works. But: You can't make the remote system do something on a third...
by tds1973lbp
03 Feb 2017 04:32
Forum: DOS Batch Forum
Topic: CMD / Batch file: Creating an output/log file on a network share doesn't work
Replies: 4
Views: 4467

CMD / Batch file: Creating an output/log file on a network share doesn't work

Hello, I want to make my CMD command's result be written to a txt file. No problem. But creating the txt on a network share doesn't work. Is this regularly impossible or do I have to chose a special syntax? ...>\\192.168.0.1\testshare\log.txt doesn't work. Creating the txt on a local drive works. Ac...
by tds1973lbp
02 Feb 2017 03:28
Forum: DOS Batch Forum
Topic: CMD Command Line: One command plus direct output of the ERRORLEVEL into a TXT?
Replies: 7
Views: 4596

Re: CMD Command Line: One command plus direct output of the ERRORLEVEL into a TXT?

Hello Steffen,

when I execute

cmd /von ""C:\Program Files\testapp\testapp.exe" &>"file.txt" echo !errorlevel!"

nothing happens.
by tds1973lbp
02 Feb 2017 03:17
Forum: DOS Batch Forum
Topic: CMD Command Line: One command plus direct output of the ERRORLEVEL into a TXT?
Replies: 7
Views: 4596

Re: CMD Command Line: One command plus direct output of the ERRORLEVEL into a TXT?

Hi Steffen,

I need something like this:

( commandToExecute ) & echo %errorlevel%>"file.txt"

I want the error level integer value (0 or 2 or 5 or something else) get written in the txt file. Only that value.
by tds1973lbp
02 Feb 2017 02:04
Forum: DOS Batch Forum
Topic: CMD Command Line: One command plus direct output of the ERRORLEVEL into a TXT?
Replies: 7
Views: 4596

CMD Command Line: One command plus direct output of the ERRORLEVEL into a TXT?

CMD Command Line: One CMD command, one command row, no BAT file. Is there a chance to get the ERRORLEVEL directly written in a TXT file? I tried but I failed. I don't want to create and save a BAT file each time. I would prefer the simpler way: CMD single command plus export of the ERRORLEVEL in a T...