I have a predefined command `\mycommand` which, for some reason, outputs `{"/home/user/di rect ory/"/}`. (Yes, there's a slash after the quotation mark, and there are curly braces.) Could one think of a one-liner or the simplest possible TeX/LaTeX code to remove the quotation marks, and possibly also the curly braces so that what remains is `/home/user/di rect ory//`?

No additional package loading, please.

```
 \def\mycommand{{"/home/user/di rect ory/"/}}

```

EDIT:
The command turned out to be `\def\mycommand{{\string "/home/user/di rect ory/\string "/}}` when the path contained spaces, and `\def\mycommand{{/home/user/directory//}}` otherwise. Still looking for an elegant way of extracting the path.