While it sounds like you eventually worked around this by using WSL, I think you could have handled this without installing WSL/Cygwin by using the 8.3 short name for the folder.
To get a cmd
prompt in the current directory from explorer, you can use the "Open Windows Powershell" option in the File menu, and then type cmd
in the shell to switch to cmd.exe
.

Run dir /x
to list the context of the current directory and get the short-name for the folder named *
, then refer to the folder by its short name to ren
ame it.
I used WSL to create a folder named *
on my Windows filesystem, and then followed the steps above to determine its DOS-compatible short-name (21BA~1
in this case), and then rename it star
using cmd.exe
:
PS C:\Users\Nick\Scripts> cmd
Microsoft Windows [Version 10...]
(c) Microsoft Corporation. All rights reserved.
C:\Users\Nick\Scripts>dir /x
Volume in drive C has no label.
Volume Serial Number is ABCD-1234
Directory of C:\Users\Nick\Scripts
03/11/2022 05:26 PM <DIR> .
03/11/2022 05:26 PM <DIR> ..
10/10/2020 04:30 PM 1,225 PORT-F~1.PS1 port-forward.ps1
03/11/2022 05:26 PM <DIR> 21BA~1
1 File(s) 1,225 bytes
3 Dir(s) 166,006,308,864 bytes free
C:\Users\Nick\Scripts>ren 21BA~1 star
C:\Users\Nick\Scripts>dir
Volume in drive C has no label.
Volume Serial Number is ABCD-1234
Directory of C:\Users\Nick\Scripts
03/11/2022 05:40 PM <DIR> .
03/11/2022 05:40 PM <DIR> ..
10/10/2020 04:30 PM 1,225 port-forward.ps1
03/11/2022 05:26 PM <DIR> star
1 File(s) 1,225 bytes
3 Dir(s) 166,006,243,328 bytes free
'*'
in single quotes, otherwise it will be considered a wildcard.ls
command already gets the literal string*
straight from readdir() and passes it back to the kernel, and thecp
error message likewise shows it trying to access a literal*
(so wildcard expansion hasn't happened thanks to the backslash), yet both get a "no" from the OS.