Acetylation of o-aminophenol (I) gives o-hydroxy acetanilide (II), which is then protected as the benzyl ether (III) with benzyl bromide and K2CO3. Treatment of acetamide (III) with P2S5 affords the corresponding thioamide (IV), and subsequent S-methylation of (IV) gives rise to the thioimidate (V). Cyclization of thioimidate (V) with 4-biphenylcarboxylic acid hydrazide (VI) in hot DMF leads to the triazole derivative (VII). After benzyl group hydrogenolysis in (VII), the resultant phenol (VIII) is alkylated with 1,6-dibromohexane (IX) to produce the bromohexyl ether (X). Finally, condensation of bromide (X) with N-methylpiperazine (XI) furnishes the title compound.