invalid name problem

Hello everyone, I want to ask for help. I want to sync a folder between two windows10 PC, but it shows that one folder’s name is invalid. I fixed the name and tried to make a full scan, which doesn’t work.

I have worked on it for several hours, and I hope that I can get some answers about it. Thanks a lot.

image

Looks like your "Introduction to Mathematical Statistics _7th " folder ends with a space?

The filename ends with a space character, which Syncthing rejects, as most Windows applications reject it too, due to limitations in the Win32 API.

Rename or delete the errant filename. You can rename the file in a Command Prompt window via:

REN "\\?\c:\path\spaceatend " c:\path\spaceatend

Thank you sir. My problem is whether i rename the folder or not(the folder named “mathmatical statistics” in picture 2 is the renamed folder), the problem is still here (picture 1). I have tried to delete the cache and reconnected the PCs, but it didn’t work.

Yes. But My problem is whether i rename the folder or not(the folder named “mathmatical statistics” in picture 2 is the renamed folder), the problem is still here (picture 1). I have tried to delete the cache and reconnected the PCs, but it didn’t work.

I don’t think you can actually rename it from explorer because it ends with a space, which is exactly the reason why we reject that as an invalid filename.

Those commands will not work. For one, rd doesn’t accept wildcards. It has to be pointed at a single folder. Secondly, it will fail without prefixing the full path with \\?\.

The actual command that will do the job is

ren "\\?\c:\path_to_folder_share\Introduction to Mathematical Statistics _7t " "Introduction to Mathematical Statistics _7t"

Just a minor nitpick, but ren doesn’t accept full paths in the second argument :wink:. You need to use just the folder name.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.