473,395 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

cant delete files with strange characters in name

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
3 2600
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Ben | last post by:
Greetings, I am looking for a way to search for and delete files based on a pattern mask. For example, the search method would find all files matching a certain pattern containing wildcards (e.g....
12
by: hokiegal99 | last post by:
The below code does what I need it to do, but I thought that using something like ext = os.path.splitext(fname) and then searching ext for '.mp3' would be a much more accurate approach to solving...
5
by: Raj | last post by:
Hi all, Can anyone help me with a script which would delete files or move them to a different folder at some scheduled time..! Please.....!!! Thanks in advance...
3
by: Jim Irvine | last post by:
I have a small database made up of 2 tables. I have a report that is driven from a query. On the report are a couple of fields linked to memo boxes in the table. Everytime I run the report I get...
1
by: Daniel Cardoso | last post by:
I don't know what else to try - In my asp.net app, when the file name has Windows-1252 characters (like ã and ç), these characters appear, each one, as two strange characters in the file name label...
22
by: Cylix | last post by:
I have a 4row x 1col table, I would like to drop all the content of row three. Since Mac IE5.2 does not suppport deleteRow method, I have also try to set the innerHTML=''; but it does not work. ...
1
by: Nathan Sokalski | last post by:
Visual Studio 2005 recently stopped generating the *.designer.vb files for my *.aspx and *.ascx files. I am using Service Pack 1, and do not believe I did anything differently than normal prior to...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
66
by: happyse27 | last post by:
Hi All, my html code is sno 1) and perl code is sno 2). a) I tried to print $filename and it cant print out the value, only blank was displayed, and the file could not be uploaded. And it...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.