How to? I need help with RD

I wanted to delete a directory foo-v1.2.3-pro in a script - but in a future-proof way, so that future versions of that foo would also be deleted.
So I read the help and came up with rd /S /Q foo-v* - and got an error-message "TCC: (Sys) Der Verzeichnisname ist ungültig." (Invalid directory name). I tried rd /= to build the command, entered that argument "foo-v*", clicked the "show"-button and verified that this matched the one directory I was after..and I ended up with exactly the same commands as I had before - and got the same response.
What's wrong?

Similar threads