I plugged my USB flash memory stick into a Mac and it gained some unwanted hidden folders. (See the question Prevent MacOS from making .* and ._* files for prevention.)

I'd now like to remove these from my drive but I ran into an issue. Inside the fseventsd folder is a subfolder that is not shown unless I disable "Hide protected operating system files" in folder options. I am then shown a folder icon with no name, and attempting to delete it results in no action and no error. Attempting to open it results in the error:

E:\fseventsd\ is not accessible

The filename, directory name, or volume label syntax is incorrect.

So I took a look using command prompt:

Command Prompt Hidden Folder View

I must admit, had I not known the parent folder was from Mac OSX I would have strongly suspected a virus, because the folder name renders as a smiley face in ASCII.

Apparently this is ASCII character "01":

Old ASCII chart

Any commands I issued in Command Prompt resulted in various syntax errors as well. I decided to try Powershell.

Unfortunately 1) I'm not very experienced with Powershell, and 2) it appears to have similar difficulty with the weird folder name. I got the following error in Powershell just trying to list the parent directory contents:

Get-ChildItem : Illegal characters in path.

Powershell Error

How can I delete this folder?

  • I guess rmdir * doesn't work?
    – Paul
    Nov 26, 2012 at 1:52
  • @Paul Unfortunately no.
    – JYelton
    Nov 26, 2012 at 2:01

4 Answers 4


I was able to "fix" this by running chkdsk /f on the drive. It converted the fseventsd folder to a file which was easily deleted. However, I don't know if this "fix" was because the subfolder appeared broken to chkdsk, or if there was something else on the volume that allowed this to work.

Offering this as an answer in case it works for others.

  • chkdsk discovers that the folder wasn't associated with a valid path and fixes the problem. (Tested by creating a folder with the `\` character on an NTFS partition with Ubuntu Linux)
    – Deltik
    Nov 26, 2012 at 2:44
  • @JYelton fseventsd became a file? Nov 26, 2012 at 5:48
  • @Louis That's correct. fseventsd was a file on the root directory rather than a folder containing an illegally named subfolder. It was empty except for the subfolder. I would have expected the subfolder to become a file, but that's not what it did.
    – JYelton
    Nov 26, 2012 at 16:23

Unfortunately, there are some filenames that the Windows APIs can't handle.

If you just want to delete the files, you could move any files that you want to keep off the flash drive, then reformat the flash drive.

If you want to keep all of your files, you'll need to use another operating system to rename them - either return to the Mac that you used originally, or use a Linux Live CD.

Another option that would work - if you don't want to go to another computer or shut down Windows - is to install Linux inside Virtualbox. You could then use the USB filter driver to grant the Linux guest OS control over the USB drive, and rename the files within Virtualbox.

  • I've no problem reformatting the flash drive to clear the unwanted folders, but if it were full (64GB) it would take a while to move the files back and forth. Another OS would likely work great, but I'm mostly interested if there's a way with Powershell or some Windows tool.
    – JYelton
    Nov 26, 2012 at 2:04
  • You would have to find an application that doesn't use the Windows API functions - such as CreateFile() and DeleteFile() - to interact with the filesystem.
    – HDMI
    Nov 26, 2012 at 2:09
  • Anyways, since chkdsk fixed the problem, that's a faster and better solution than any of my suggestions.
    – HDMI
    Nov 26, 2012 at 2:16
  • Actually, even with linux it might fail to remove the folder with illegal file name. I've just had a situation where a script of mine created a folder containing %,\ ,$. Accessing the folder using various versions of ntfs-related utils and live-sticks resulted in Input/Output-Error, trying to remove it as root gave folder not empty. In my case, the only solution was to use chkdsk under windows. (Lesson: Be careful when running your linux-scripts on an ntfs-partition...)
    – Legionair
    Dec 6, 2013 at 17:25

I'm pretty sure that there is a third way to do this, at least under Windows XP.

Right click on the file in explorer. The file name will have a weird placeholder in place of the illegal character. Remove it and close the properties window. It renames the file. At least it has in my experience.



I have had the same problem and solved it as follows:

  • Install NFS on the Windows server of PC
  • Mount the Windows file on a Linux PC or in my case a Solaris Unix server
  • The Unix root user must have full access to the Windows PC
  • Remove the file's of folder from the Unix system with rm -r

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.