cant delete files with strange characters in name

  • Thread starter Thread starter Scott_Tuttle
  • Start date Start date
S

Scott_Tuttle

I'm trying to delete files with strange characters in the names but csharp
doesnt seem to be able to see them at all. Solution??
 
When you say "csharp" can't "see" these files, what do you mean?

How are you trying to delete the files? -- can you send some code?

What constitutes "strange" characters? -- can you give examples of files
that you *can* delete and filenames that you *can't* delete?

With some more info, I bet we can help you out...
 
I tried to do a File.Exists and it came back as false.
Nothing fancy, just using:

File.Delete("C:\\Temp\\Cos sie.doc");

These are files with polish filenames. I'm assuming they're using utf8 or
unicode of some kind. File.Delete works ok with filenames of a 'normal'
kind.
 
I tried to do a File.Exists and it came back as false.
Nothing fancy, just using:

File.Delete("C:\\Temp\\Cos sie.doc");

These are files with polish filenames. I'm assuming they're using utf8 or
unicode of some kind. File.Delete works ok with filenames of a 'normal'

How are you specifying the character in the filename? I suggest you use
the unicode escape sequence for the character, ie \uxxxx where xxxx is
the hex number of the character.
 
Back
Top