By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,369 Members | 1,131 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,369 IT Pros & Developers. It's quick & easy.

cant delete files with strange characters in name

P: n/a
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??
Nov 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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...

"Sc**********@hotmail.com" <sc**********@hotmail.com> wrote in message
news:10*************@corp.supernews.com...
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??

Nov 16 '05 #2

P: n/a
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.

"Philip Rieck" <st***@mckraken.com> wrote in message
news:Ob**************@tk2msftngp13.phx.gbl...
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...

"Sc**********@hotmail.com" <sc**********@hotmail.com> wrote in message
news:10*************@corp.supernews.com...
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??


Nov 16 '05 #3

P: n/a
Sc**********@hotmail.com <sc**********@hotmail.com> wrote:
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.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.