\documentclass{article}
\begin{document}
\immediate\openout0=../test\relax
\write0{\noexpand\bf byebye}
\closeout0
\end{document}
