Rename folder with trailing space

I often come across folders I’m unable to delete and more often than not, it’s due to a trailing space at the end of the folder name. Mac and Linux machines seem to be the cause but I’m not 100% sure how.

There’s a few different ways to solve this but the following has pretty much worked everytime for me:

rd "\\?\C:\Data\Bad Folder Name "

Leave a Reply

Your email address will not be published.