Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to have a slash "/" in a filename? The "real" slash, not some other Unicode symbol. The file system should be FAT16/32 and Ext4.

share|improve this question
If you could, how would you use it? How would you say you want to open the file "a/b" rather then the file "b" in a directory "a"? – David Schwartz Oct 26 '12 at 2:00
Escape it whit a backslash like for other special characters. It works for * and ?... Example: "a\/b" – Den Oct 26 '12 at 7:33
That doesn't actually help. How would you tell whether "a\/b" meant the file "a\/b" or the file "b" in the directory "a\"? A backslash is a legal character in a filename. It's impossible in principle to have something that's a directory separator but also allow every possible sequence in a file name. Some sequence must be prohibited in a file name in order to be unambiguously used as a directory separator. – David Schwartz Oct 26 '12 at 17:49
up vote 4 down vote accepted


No. ext4 allows all Unicode characters except NUL and /. The latter can't be used because it is the file system's directory separator.


FAT16/32 doesn't support / natively, but long filenames (LFN) do.

However, the LFN drivers in Windows, Linux, Unix, MS-DOS, OS/2 and possibly other operating systems do not allow / to be part of a LFN. Even if you could create such a file with a different OS, you most likely wouldn't be able to access it using those operating systems.

Source: Comparison of file systems - Wikipedia

share|improve this answer
> FAT doesn't support / natively, but long filenames (LFN) do. Huh‽ Where does it say that FAT supports /? o.O > Even if you could create such a file with a different OS, you most likely wouldn't be able to access it using those operating systems. That’s correct. I have done experiments in the past where I used a hex-editor to directly modify filenames in directory entries and while I could view directory listings, DOS and Windows (and of course programs) usually balked at anything that contained illegal characters. Some could still be renamed using wildcards, some could not. – Synetech Dec 1 '12 at 23:40
@Synetech: I said that FAT does not support /. Am I misunderstanding something? – Dennis Dec 1 '12 at 23:49
You said that / can be used in long-filenames, but I have never seen anything to that effect. LFNs (i.e., vFAT) supports a few characters that plain FAT does not like + and ", but last I checked, / is not one of them. Were you referring to a file-system plug-in or something? – Synetech Dec 2 '12 at 0:33
According to the Wikipedia article I linked to, VFAT LFN supports all Unicode characters except NUL. But that probably refers to the current specification (I can't find it), so this claim would be true if if there wasn't an actual implementation that supports all those characters. – Dennis Dec 2 '12 at 2:41
@Synetech after some errors on a FAT 32 file, I now have a file whit a slash in its name (but sadly completely unrelated to where I want to have it in the first place). And yes, I can't do any thing whit it. That includes I can't delete it. How did you edit the directories whit a hex-editor? – Den Dec 20 '12 at 6:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .