Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do i create a file in c# which name include a special character (in my case it's /)

for example I want to generate a pdf file from crystal report with name WB074/A504
Posted
Updated 20-Sep-11 20:51pm
v2

You can't.

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:

< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)

Source
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#naming_conventions[^]

Cheers
 
Share this answer
 
v2
You cannot use the following characters in file names as Windows will not allow it and they have special meanings :

\ / | : * " ? < >
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900