Windows - How to remove 'invalid filename' error

I have a file on Windows that is causing an Out Of Sync on the folder. I’m not sure how the file got there but the error is:

Puller (folder "Books" (ykrfz-udcax), item "Technical\\Structure and\r\nInterpretation\r\nof Computer \r\nPrograms.pdf"): filename is invalid

The file doesn’t exist on any device. It also makes sense the filename is invalid \r\n characters) but I’d like to get rid of the file from the index so the error does not appear?

I have added this to the .stignore:

!Structure[\w -]
(?d)Structure?

(based on this post but no joy. I also tried !Structure{[a-z],[A-Z],[0-9],_,-]} but that didn’t work either).

Any suggestions?

Presumably this file originated on a non-Windows system. Deleting or renaming it there should clear it.

I know you say it doesn’t exist anywhere; nonetheless we have an entry for it that says it should be synced, so it ought to exist somewhere… Syncthing doesn’t have the imagination to make it up on its own.

Your ignore patterns are complicated and, I think, not correct. I’d be more direct, something like Structure and??Interpretation??of Computer ??Programs.pdf, if you want to go that route. (Copy/paste of file name, question marks to match the forbiddens.) The pattern needs to match the entire file name.

I actually don’t know where it originated. It doesn’t exist so cannot be deleted or renamed.

I didn’t suggest Syncthing made it up at all. When I say the file doesn’t exist anywhere I mean it doesn’t exist, anywhere. The file is not on any device. It may have been in the past but it doesn’t exist now.

That makes it no longer flag up as an issue. How do I get rid of it completely without adding that pattern to every ignore file?

Nonetheless, for the file to show up in an error it must be announced from somewhere. It should exist on that device. If it does not I’m not sure what going on, sorry.

You can query the rest api (https://docs.syncthing.net/rest/db-file-get.html) for such a file to find out which device is announcing the file and then solve it from there.

1 Like

Good luck calling that with new lines in the name :smiley:

1 Like

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