http://stackoverflow.com/questions/146134/how-to-remove-illegal-characters-from-path-and-filenames



cf. #

윈도우의 경우.
CHAR HEX
"; 22
<; 3C
>; 3E
|; 7C
[; 01
]; 02
; 03
; 04
; 05
; 06
; 07
; 08
 ; 09

; 0A
; 0B
; 0C
 ; 0D
; 0E
; 0F
; 10
; 11
; 12
; 13
; 14
; 15
; 16
; 17
; 18
; 19
; 1A
; 1B
; 1C
; 1D
; 1E
; 1F
:; 3A
*; 2A
?; 3F
\; 5C
/; 2F
"; 22
<; 3C
>; 3E
|; 7C
[; 01
]; 02
; 03
; 04
; 05
; 06
; 07
; 08
 ; 09

; 0A
; 0B
; 0C
 ; 0D
; 0E
; 0F
; 10
; 11
; 12
; 13
; 14
; 15
; 16
; 17
; 18
; 19
; 1A
; 1B
; 1C
; 1D
; 1E
; 1F

유닉스의 경우
[01:14] <hyacinth> !csharp string os_info = System.Environment.OSVersion.VersionString; System.Console.Write(os_info);
[01:14] <냐옹이컨벤션센터> Unix 3.13.0.30

[01:08] <hyacinth> !csharp string invalidPathChars = new string(System.IO.Path.GetInvalidFileNameChars()) + new string(System.IO.Path.GetInvalidPathChars());
[01:08] <냐옹이컨벤션센터> (no output)
[01:08] <hyacinth> !csharp string invalidPathChars = new string(System.IO.Path.GetInvalidFileNameChars()) + new string(System.IO.Path.GetInvalidPathChars()); foreach (char c in invalidPathChars){System.Console.Write(c.ToString() + "; " + System.Convert.ToByte(c).ToString("X2"));}}
[01:08] <냐옹이컨벤션센터> (1,254): error CS1525: Unexpected symbol `}'
[01:09] <hyacinth> !csharp string invalidPathChars = new string(System.IO.Path.GetInvalidFileNameChars()) + new string(System.IO.Path.GetInvalidPathChars()); foreach (char c in invalidPathChars){System.Console.Write(c.ToString() + "; " + System.Convert.ToByte(c).ToString("X2"));}
[01:09] <그건아니지> ...
[01:10] <hyacinth> !csharp string invalidPathChars = new string(System.IO.Path.GetInvalidFileNameChars()) + new string(System.IO.Path.GetInvalidPathChars()); foreach (char c in invalidPathChars){System.Console.Write(c.ToString() + "; " + System.Convert.ToByte(c).ToString("X2"));}System.Console.Write(invalidPathChars.Length.ToString());
[01:10] <hyacinth> !csharp string invalidPathChars = new string(System.IO.Path.GetInvalidFileNameChars()) + new string(System.IO.Path.GetInvalidPathChars()); System.Console.Write(invalidPathChars.Length.ToString());
[01:10] <냐옹이컨벤션센터> 3
[01:11] <hyacinth> !csharp string invalidPathChars = new string(System.IO.Path.GetInvalidFileNameChars()) + new string(System.IO.Path.GetInvalidPathChars()); System.Console.Write(System.Convert.ToByte(invalidPathChars0).ToString("X2"));
[01:11] <냐옹이컨벤션센터> 00
[01:11] <hyacinth> !csharp string invalidPathChars = new string(System.IO.Path.GetInvalidFileNameChars()) + new string(System.IO.Path.GetInvalidPathChars()); System.Console.Write(System.Convert.ToByte(invalidPathChars1).ToString("X2"));
[01:11] <냐옹이컨벤션센터> 2F
[01:11] <hyacinth> !csharp string invalidPathChars = new string(System.IO.Path.GetInvalidFileNameChars()) + new string(System.IO.Path.GetInvalidPathChars()); System.Console.Write(System.Convert.ToByte(invalidPathChars2).ToString("X2"));
[01:12] <냐옹이컨벤션센터> 00

Retrieved from http://hyacinth.byus.net/moniwiki/wiki.php/C_Sharp/잘못된 파일 이름이나 경로 검색 삭제
last modified 2014-09-11 11:28:53