I pasted the following line into the DOS PROMPT/DOS Command Line:
del D:\myTempFolder\myTempFile.txt
It worked well -- I was able to delete the file myTempFile.txt'' inside the foldermyTempFolder''. I did not use the forward slash since it has a different meaning (switches) when associated with the del command.
I was wondering if I can implement the preceding routine inside a LaTeX file, so i tried the following:
\documentclass{article}%
\newcommand*{\myFolderName}{myTempFolder}
\newcommand*{\myFileName}{myTempFile.txt}
\begin{document}
\immediate\write18{del D:\textbackslash\myFolderName\textbackslash\myFileName}%
\end{document}
The file ``myTempFile.txt'' was not deleted. May I know where my mistake is? I think the problem here is escaping the backslash inside \immediate\write18 with the del command.
Thank you for any help.