# How to remove quotation marks in the final command output?

**URL:** https://discourse.cmake.org/t/how-to-remove-quotation-marks-in-the-final-command-output/3226
**Category:** Code
**Created:** [April 28, 2021, 11:51am UTC](https://discourse.cmake.org/t/how-to-remove-quotation-marks-in-the-final-command-output/3226 "2021-04-28T11:51:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mscofield0](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mscofield0/32/1413_2.png) [@mscofield0](https://discourse.cmake.org/u/mscofield0)
#### Post date: [April 28, 2021, 11:51am UTC](https://discourse.cmake.org/t/how-to-remove-quotation-marks-in-the-final-command-output/3226/1 "2021-04-28T11:51:38Z")

</div>

So I need to remove the quotation marks from the commands, I don’t see how though… Please help.

The error:

```bash
FAILED: CMakeFiles/ccov-clean
cmd.exe /C "cd /D ...\build\test && "del \f ...\build\test\ccov\binaries.list" && "del \f ...\build\test\ccov\profraw.list" "
The filename, directory name, or volume label syntax is incorrect.

```

The relevant CMake code:

```cmake
add_custom_target(
  ccov-clean
  COMMAND 
    "$<$<PLATFORM_ID:Windows>:del /f ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/binaries.list>"
    "$<$<PLATFORM_ID:Linux, Darwin>:rm -f ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/binaries.list>"
  COMMAND 
    "$<$<PLATFORM_ID:Windows>:del /f ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/profraw.list>"
    "$<$<PLATFORM_ID:Linux, Darwin>:rm -f ${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/profraw.list>"
)

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [April 28, 2021, 3:02pm UTC](https://discourse.cmake.org/t/how-to-remove-quotation-marks-in-the-final-command-output/3226/2 "2021-04-28T15:02:04Z")

</div>

What if you replace the spaces with `;` instead? Or better would be to use `"${CMAKE_COMMAND}" -E rm -f "${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/binaries.list" "${CMAKE_COVERAGE_OUTPUT_DIRECTORY}/profraw.list"` so you don’t need it to be platform-dependent.

---

<div class="post-metadata">

### Author: ![mscofield0](https://discourse.cmake.org/user_avatar/discourse.cmake.org/mscofield0/32/1413_2.png) [@mscofield0](https://discourse.cmake.org/u/mscofield0)
#### Post date: [April 29, 2021, 7:40am UTC](https://discourse.cmake.org/t/how-to-remove-quotation-marks-in-the-final-command-output/3226/3 "2021-04-29T07:40:24Z")

</div>

Oh I didn’t know about `${CMAKE_COMMAND}` making it platform-independent. Thanks Ben!
