[MSDOS] netstat > netstat.txt
Solved
dude
-
dje-dje Posted messages 10538 Registration date Status Moderator Last intervention -
dje-dje Posted messages 10538 Registration date Status Moderator Last intervention -
Hello everyone, I have an issue with my MSDOS. Usually, I use these commands to put the NETSTAT info into a text file:
netstat > netstat.txt
netstat -n > netstatn.txt
netstat -a > netstata.txt
But this command hasn't been working for the last two days, why?
Is this command correct? Did I make a mistake? Because I create a BAT with these commands but when I run it, a MSDOS window opens but nothing happens, the text files are not created! Help please
Thank you, have a good evening.
netstat > netstat.txt
netstat -n > netstatn.txt
netstat -a > netstata.txt
But this command hasn't been working for the last two days, why?
Is this command correct? Did I make a mistake? Because I create a BAT with these commands but when I run it, a MSDOS window opens but nothing happens, the text files are not created! Help please
Thank you, have a good evening.
Configuration: Windows XP Internet Explorer 7.0
10 answers
Try perhaps to indicate the file path to find it
netstat -a > c:\netstat.txt
--
a+
netstat -a > c:\netstat.txt
--
a+
dje-dje
A good link is worth more than a long speech
Hello.
I searched for which service might correspond to netstat but actually none.
It might be a key that's wrong, or your PATH, I don't know!
The solution while you find something better, I'm giving you mine:
http://cqgclub.dyndns.org/BDC/telech/netstat.exe
Normally it's in system32 but since it's also in dllcache, put it somewhere else because it might get replaced. Place it for example in Windows, and if your batch still doesn't work, try:
Let me know if it works or not. See you later!
--
it's hard to make a signature ;)
I searched for which service might correspond to netstat but actually none.
It might be a key that's wrong, or your PATH, I don't know!
The solution while you find something better, I'm giving you mine:
http://cqgclub.dyndns.org/BDC/telech/netstat.exe
Normally it's in system32 but since it's also in dllcache, put it somewhere else because it might get replaced. Place it for example in Windows, and if your batch still doesn't work, try:
%systemroot%\netstat
Let me know if it works or not. See you later!
--
it's hard to make a signature ;)
Thank you for your responses, dje-dje I tried and it doesn't work either arf!
The problem is that when I go to start>run>netstat it works fine but when I type the command netstat > netstat.txt it doesn't work...
CH4NCE: what I don't understand is why it worked 2 days ago and now it doesn't work anymore ??
A+
The problem is that when I go to start>run>netstat it works fine but when I type the command netstat > netstat.txt it doesn't work...
CH4NCE: what I don't understand is why it worked 2 days ago and now it doesn't work anymore ??
A+
Yes, it's weird that it suddenly stopped working.
But netstat works!!!
The redirection to a file in run, however, doesn’t work.
Do it from the command interpreter.
start=>run=>cmd
type these lines and tell me what works and what doesn't:
--
it's hard to make a signature ;)
But netstat works!!!
The redirection to a file in run, however, doesn’t work.
Do it from the command interpreter.
start=>run=>cmd
type these lines and tell me what works and what doesn't:
netstat netstat > c:\test type c:\test
--
it's hard to make a signature ;)
Here you go, take this little batch:
http://cqgclub.dyndns.org/BDC/telech/netviewer.bat
You can know the options of netstat by typing
https://www2.deloitte.com/fr/fr/pages/risque-compliance-et-controle-interne/articles/cyber-academy.html/ressources/breves/min_srv_res_win.html.fr
Cheers! ;)
--
it's hard to make a signature ;)
http://cqgclub.dyndns.org/BDC/telech/netviewer.bat
You can know the options of netstat by typing
netstat /?in the command interpreter, and you can learn more about how netstat works in this excellent document:
https://www2.deloitte.com/fr/fr/pages/risque-compliance-et-controle-interne/articles/cyber-academy.html/ressources/breves/min_srv_res_win.html.fr
Cheers! ;)
--
it's hard to make a signature ;)
I feel like his problem is more related to the redirection in a file than to the command itself.
Maybe he could let us know if the result of the command displays correctly (without errors) in DOS at first.
Then test if the redirection of another command works (like dir for example)
--
a+
Maybe he could let us know if the result of the command displays correctly (without errors) in DOS at first.
Then test if the redirection of another command works (like dir for example)
--
a+
dje-dje
A good link is worth more than a long speech
Well, apparently the command and redirection work:
msdos netstat netstat txt#4
It's just that the redirection in run works point, same for me.
However, I don't know why and I had never thought of doing it.
As for his batch not working, I don't see why, unless he couldn't find the file, which is easy to check but since netstat and redirection normally work...
See you later ;)
--
it's hard to make a signature ;)
msdos netstat netstat txt#4
It's just that the redirection in run works point, same for me.
However, I don't know why and I had never thought of doing it.
As for his batch not working, I don't see why, unless he couldn't find the file, which is easy to check but since netstat and redirection normally work...
See you later ;)
--
it's hard to make a signature ;)
Thank you CH4NCE, your BAT works perfectly :), but I don’t understand why this command is no longer working:
netstat >> netstat.txt
Because it used to work very well before... it’s really strange!
Anyway, thank you CH4NCE :) and thank you dje-dje ;)
netstat >> netstat.txt
Because it used to work very well before... it’s really strange!
Anyway, thank you CH4NCE :) and thank you dje-dje ;)
In the Run dialog, you need to prefix the command with "cmd /k":
--
Jeff - Wm@Ccm -
cmd /k netstat -a > c:\netstata.txt
--
Jeff - Wm@Ccm -