Error: The name of the input file cannot contain the special shell characters: [ <>()|\:&;#?*'] (attempted to copy to a version without those characters 'TF-Analysis-Results.Rmd' however that file already exists) Execution halted

Trying to knit an word and I keep getting this error

Error: The name of the input file cannot contain the special shell characters: [ <>()|:&;#?*'] (attempted to copy to a version without those characters 'TF-Analysis-Results.Rmd' however that file already exists)
Execution halted

Any idea to resolve?

Copy to a file named testit.Rmd in the current directory. If that works decide whether to keep

or use it for testit.Rmd new name.

What is the name of that file ?

Error seems clear to me.

  • You have a file with some special chars that is called with rmarkdown::render()
  • rmarkdown will remove those chars to try another file without those chars. We need this for handling resources correctly if I remember well.
  • Somehow you already have a file with the simplified name - is it yours ? Or past one not deleted properly after render ?

Either it is an issue of leftover from a previous rendering or we have an issue / special edge case in the dealing of files with special chars. In the latter case, I need to know more about the current context (filename, ...)