[Dx4win] Simple LOTW Search

David Tingler dtingler at sooner.net
Mon Mar 26 17:50:43 EDT 2018


The ARRL makes available a list of all LOTW users, along with the date of their last upload. I wrote a simple batch file to search the list and display the results in DX4WIN when the F3 key is pressed. I thought some of you might find this useful. 

1. Download the LOTW User Activity report from: https://lotw.arrl.org/lotw-user-activity.csv and save it in a directory accessible to DX4WIN. I put mine in a subdirectory of the DX4WIN SAVE directory I called SEARCH.

2. Create a batch file with Notepad containing the text below and put it in the same directory where you saved the activity report. I called my batch file SEARCH.BAT.

@echo off
set call=%1
set result=Not Found
for /f "tokens=1-3 delims=," %%a in (lotw-user-activity.csv) do (
if /i "%%a"=="%call%" set result=%%b
 )
echo %call% %result%

3. In DX4WIN Preferences, enable the QSL Manager Search (.exe) check box on the External Data panel and fill in the edit box with the path to your batch file. I have mine set to C:\DX4W903\SAVE\SEARCH\SEARCH.BAT. You will get an error when you press F3 if the path is incorrect.

You can add other searches to your batch file using something like the Windows FINDSTR or a GREP implementation. I have used this method to search member and bureau lists in the past. 

Here is an example of the output generated by the F3 key. The first part is from the QRZ XML service and only the last two lines pertain to the search batch file.

W1AW
ARRL HQ OPERATORS CLUB
225 MAIN ST
NEWINGTON, CT 06111
United States
QSL Info: US STATIONS PLEASE QSL VIA LOTW OR DIRECT WITH SASE.
State: CT
County: Hartford
GRID: FN31pr
----QSL info from: C:\DX4W903\SAVE\SEARCH\SEARCH.BAT
W1AW 2018-03-09

The date is replaced with "Not Found" if the station is not found in the activity report. I don't think you will have any problem with these instructions. As always, I can't be responsible if anything bad happens.

73, David - N5DT



More information about the DX4WIN mailing list