I'd first try this one
using (System.IO.FileStream fs = File.Open(path, FileMode.Open, FileAccess.Write, FileShare.None))
{
foreach (FileInfo FI in FileList )
{
listBox1.Items.Add(FI.Name);
byte[] writeFileName = ASCIIEncoding.GetBytes(FI.Name);
fs.Write(writeFileName, 0, writeFileName.Length);
}
}
Maybe
ASCIIEncoding
is not what you want, then try another encoding like
UTF8Encoding
or so.