Delete a directory with a trailing space in its name #

We've seen the confusion a trailing space in a filename can cause. The same problem in a directory name stored on a FAT32-formatted flash drive made it impossible to delete under OS X with the usual workarounds, but Windows managed it via:

C:\>rd "\\?\e:\dirname "

For more information, see Cause 5: The file name includes a reserved name in the Win32 name space in this KB article: You cannot delete a file or a folder on an NTFS file system volume.

/windows | Mar 31, 2013


Subscribe or visit the archives.