Two columns with identical names and /cols switch

Started by Blair M

Blair M

Two columns with identical names and /cols switch   31 July 2018, 09:33

Hi there,
I have two host name columns, and trying to use the export function. I need to export Host name (the SNMP host name name), not Host Name column - note the lowercase/uppercase difference in the Name. I am using the following command line:
start /wait netscan.exe /hide /cols:"IP Address;System Description;Host name"
And it looks like I get the wrong host name column.

SoftPerfect support forum
SoftPerfect Support forum - Andrew avatar image

Re: Two columns with identical names and /cols switch   31 July 2018, 09:34

The Scanner's code looks for the first column matching the requested name, and the search is case-insensitive.

This can be easily worked around by renaming the SNMP column into something like SNMP Host Name and change /cols accordingly:
... /cols:"IP Address;System Description;SNMP Host Name"
We are planning to script a solution so will never actually use the GUI and it could be a different account using it (Task Scheduler). Is it possible to save the column names as a profile and load it? We will call it to scan multiple ranges.
SoftPerfect Support forum - Ann avatar image

Re: Two columns with identical names and /cols switch   13 August 2018, 12:03

Sure, it is possible. What you could do is configure the app as required with columns, IP address ranges, etc. Then save the current config to a file (via File - Current Config - Save to File) and use it like this:
netscan.exe /config:PATH-TO-CONFIGFILE.xml /cols:"IP Address;SNMP_Host_Name" /auto:"path-to-result.csv"
As a result, column settings, IP address ranges and all other settings will be loaded from CONFIGFILE.xml. Once the scan has finished, the results will be exported to result.csv and only the requested columns will be included.

To scan multiple ranges you can either define them as a part of the configuration or simply add to the command line:
Specifying the /range parameter will override any ranges loaded from a config file with /config.

Reply to this topic

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.




A brief and informative title for your message, approximately 4–8 words:


Spam prevention: please enter the following code in the input field below.

 **    **  **         **    **   *******    *******  
 **   **   **    **   ***   **  **     **  **     ** 
 **  **    **    **   ****  **  **         **     ** 
 *****     **    **   ** ** **  ********    ******** 
 **  **    *********  **  ****  **     **         ** 
 **   **         **   **   ***  **     **  **     ** 
 **    **        **   **    **   *******    *******