Ping bulk ULR with batch and Knime

Dears,
I need to run a below batch file with KNIME, to get ping result of the many URL.
Is there any way to running batch file and get result in Knime?

@echo off
for /f "delims=" %%a in ( ' type "e:\url-list.txt" ' ) do ping -n 1 %%a >nul && (echo %%a ok) || (echo %%a failed to respond) 
pause

Save as as a .BAT:

BR,
Milad

Hi @natanzi -

You can try the Bash or External Tool nodes for this purpose.

3 Likes

Dear @natanzi

Alternatively to @ScottF suggestions, you may also use a Java Snippet to execute command line programs and recover their output:

The workflow with your data is run and available here:

20220110 Pikairos Ping bulk ULR with Java and Knime.knwf (22.1 KB)

Hope this helps.

Best

Ael

6 Likes

Hi Ael,

I’ve been using something similar to this, but never collected the StdOutput of my called program. I’m gonna steal this, it’s very useful to me. Thank you =)

2 Likes

Hi @Thyme

Thanks a lot for your kind comments and please feel free to ‘steal’ any of my workflows lol :laughing:

I have been following your posts from the beginning and always find them very interesting. Thanks a lot for all your contributions too !

Best wishes,

Ael

Thank you, it’s nice to hear that my posts are appreciated. I also learned some things, so I guess that’s a win win? :upside_down_face:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.