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.
Replies
Know the answer? Post it — somebody with the same question will find it here.