using SQLCMD to export/extract data withot trailing spaces
Despite how the SQLCMD usage screen (SQLCMD -?) describes the -W parameter:

[-W remove trailing spaces]

the actual purpose of this parameter is not to remove existing trailing spaces but rather to skip padding a value with spaces.  If a string value already has trailing spaces of its own, they cannot be removed if you simply specify the -W parameter.
As far as I can see, there is no way to resolve this issue with parameters.  You will have to either manipulate the output with text processing utilities or generate the values without the trailing spaces in the first place.  For the latter you can use the RTRIM() function, but that, of course, means you will have to replace the SELECT * with an actual column list, where some columns would be computed columns:
SELECT
  ...
  RTRIM(SomeStringColumn) AS SomeStringColumn,
  ...
FROM
  ...