TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Arthur McAlister
NA
1
0
How To: Write files containing device names
May 15 2006 10:12 PM
I have an application that exports data from a database. The file names are determined by the information in the database. My code looks like
System.IO.
StreamWriter
sw = System.IO.
File
.CreateText("c:\\temp\\" + dataname + ".txt");
The problem is, some of the data items are the same as system devices. So if I try to write to the file c:\temp\prn.txt I get the error "Filestream will not open Win32 devices such as disk partitions and tape drives. Avoid use of
\\.\
in the path"
Does anyone know how to avoid this problem? I have no control over the data names created in the database and the file names need to match.
Thanks
Spike.
Reply
Answers (
0
)
How to enable Ctrl+C, Ctrl+V, Ctrl+X in a text box?
Name of CustomDocumentProperties