I ran into exactly the same issue, trying to upload via FTPS to a dynamically-generated folder name. In my case, I specified the following variable construction as the folder name...
{DATENOWADD(Days|-1|ddd)}
That construction evaluated & rendered just fine in the Variables window, but the VC did not evaluate it for actual upload. Instead, VC passed the explicit value "{DATENOWADD(Days|-1|ddd)}" to the FTP site, resulting in the "illegal character" error.
Workaround: What I did was to create a new user-defined variable, itself defined as " {DATENOWADD(Days|-1|ddd)}", and *that* UD variable exhibited exactly the same failure-to-evaluate issue as the FTP upload in the "Variables" window.
But--by using the UD variables area--I could then play around with alternative combinations of the native VC variables, until it properly generated the weekday-before-today string that I sought.
With the new user-defined variable operational, then I used that variable successfully in the FTPS upload. I'd suspect that you can use the same approach to get to where you want; and, you might even need to use a {ud-variable inside a ud-variable} to get to the resulting string you want.