Upon further investigation.Your example does work Petr, but having the names as strings does not corrupt the Unicode string. I tried a$ and b$ as is and reversed. Worked fine. The problem comes to light here: A directory created by Firefox and Winrar exaction. Vol. 4 Ch. 16.2 - Hero, Officially Employed ②
Using shell (dir and capture) and using Steve's directory.h program the string converts to "Vol. 4 Ch. 16.2 - Hero, Officially Employed ?" See the problem now. I never really got an un-corrupted Unicode string to use in rename function. Which I think highlights another possible problem with rename function. I will just provide a direct example not using strings (my prog uses):
Rename "Vol. 4 Ch. 16.2 - Hero, Officially Employed ?" as "ch-016-2", my program uses rename a$ as b$. But it is presented as shown to the system.
Summery: I am not getting the true Unicode dirfilename. Using ? in a rename statement is very bad.
Thoughts ?
This could be a real issue for languages other that "ALL" English code page 000.
ps: A reply as I was typing
@bplus. my point is still valid. I did not use the _cwd function. And I will use the new and improved directory.h example from now on.