|
Answer» Hi friends,
I'd like to get a batch script to accept one argument indicating port number and the output of the script is the program name which currently OCCUPIES the port. Just like:
input: demo.bat 80 output: firefox.exe question: what scripts should be IMPLEMENTED in demo.bat?
Could you PLEASE do me a favor?
Thanks in advance!!http://www.petefreitag.com/item/77.cfm And that helps how exactly, terrylangley? I'd download and use http://www.mcafee.com/us/downloads/free-tools/fport.aspx FPORT with /a switch (/a sort by application) and pass the Firefox.exe application switch to it, you then can use batch to use the output and parse it as needed to perform other tasks or just >>write_output_to_file.txt in which other programs can READ in the txt file and run routines that batch may not be ABLE to perform.
Great link on parsing with batches: http://ss64.com/nt/for_f.html
|