• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Deleting case sensitive xml file

 
Ranch Hand
Posts: 217
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to delete my xml file so I can rename my temp one to the name of the original however it only deletes it if I place the filename all in lowercase letters. The file name as it stands uses a mixture of upper and lowercase but won't delete as a result. Is there a way round this?
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alice,
If you are using Mac/Linux/UNIX, file names are case sensitive. You'll need to find out the exact file name to do the delete. You might know it in which case, you can code it. If not, you can write code that looks at the filenames in the directory and finds the one having a toLowerCase() name matching what you are looking for.
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On the other hand if you're using Windows, then what you describe is a feature of Windows which applies to all files, not just XML files. That's assuming that you are using Windows Explorer or the command line to rename the file -- you didn't say how you were trying to do the rename. If my two guesses are right then the way to get around that is to rename the file to something completely different and then rename it back to what you really wanted. But in future it would help if you explained your problem in a little more detail.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic