This is very important for me, naming of file/folder which contain these characters.
It may be important to you, but you will have to let this go and find a different way to solve your problem.
These characters are not allowed by the Windows OS function calls that handle filenames.
They are specifically not allowed because they have another use:
- \ - Reserved for use as a path separator and escape character
- / - Reserved for use as a path separator
- : - Reserved for use as a drive name delimiter
- * and ? - Reserved for use as wildcard characters
- " - Reserved for use to quote names containing spaces
- <, > and | - Reserved for use as command redirection operators
You can, of course, create files with names containing these characters using a different operating system (as long as that operating system can read/write a Windows file system).
However, you will be unable do do anything with those files using any Windows programs and they will not understand the file names and will generate errors.
Naming Files, Paths, and Namespaces
Naming Conventions
The following fundamental rules enable applications to create and
process valid names for files and directories, regardless of the file
system:
...
Use any character in the current code page for a name, including
Unicode characters and characters in the extended character set
(128–255), except for the following:
Source Naming Files, Paths, and Namespaces
But I really want to do this anyway.
Install cygwin and use touch
.
I haven't tested all the possibilities but the following work:
touch :
touch \|
touch \"
touch \>
Example output:
DavidPostill@Hal /f/test/impossible
$ ll
total 0
-rw-rw-rw-+ 1 DavidPostill None 0 Aug 10 21:03 '"'
-rw-rw-rw-+ 1 DavidPostill None 0 Aug 10 21:02 :
-rw-rw-rw-+ 1 DavidPostill None 0 Aug 10 21:02 '|'
-rw-rw-rw-+ 1 DavidPostill None 0 Aug 10 21:07 '>'
As you can see they are not usable in Windows:
F:\test\impossible>dir
Volume in drive F is Expansion
Volume Serial Number is 3656-BB63
Directory of F:\test\impossible
10/08/2016 21:07 <DIR> .
10/08/2016 21:07 <DIR> ..
10/08/2016 21:03 0
10/08/2016 21:02 0
10/08/2016 21:07 0
10/08/2016 21:02 0
4 File(s) 0 bytes
2 Dir(s) 1,772,601,536,512 bytes free
⧹ ⧸ ﹕ ✱ ﹖ ‹ ›
, which contains characters that merely look like the ones Windows won't allow. @KamilMaciorowski , lick that!