Tuesday, June 27, 2017

Explorer has trouble with filenames ending in spaces

One user noticed some weird behavior of File Explorer when working with items whose names end with a space. Such items can't be deleted; Explorer claims it's no longer located in the parent folder. Renaming it produces an error that the source and destination names are the same. That probably indicates that Explorer trims the file name before doing anything with it.

The only way to get rid of such an item is to use the absolute path syntax \\?\ in a command prompt. The name should be passed in quotes so that the command knows to include the trailing space.

No comments:

Post a Comment