The synthesis of the benzothiophene analogues of the orally active ant
ifungal agents ketoconazole and itraconazole 3a and 3b is reported. Th
e key heterocyclic system 3-(1-piperazinyl)benzo[b]thiophene is prepar
ed by formation of the enamine between a benzothienone and ethyl 1-pip
erazinecarboxylate. After elaboration of the respective N-substituents
, the methoxy group is cleaved with boron tribromide, and O-alkylated
with the corresponding mesylates.