Results 1 to 3 of 3
  1. #1
    Fluffy93 is offline Member
    Join Date
    Aug 2014
    Posts
    32
    Rep Power
    0

    Default Deleting a case sensitive file in Java

    If my file name is MyBigXMLFile.xml it won't delete but if I rename it to mybigxmlfile.xml it will delete.

    How do you get around the case sensitive issue?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    26

    Default Re: Deleting a case sensitive file in Java

    Don't you think it's time you learn about the ethics of forum postings and provide links to all cross posts?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Fluffy93 is offline Member
    Join Date
    Aug 2014
    Posts
    32
    Rep Power
    0

    Default Re: Deleting a case sensitive file in Java

    Sorry - I feel bad for not knowing that. I don't want it to look like I'm messing about - I really find using the two forums immense help

    I have placed the link below for my other post that relates to this:
    Boolean doesn't appear to work (Beginning Java forum at JavaRanch)

    Am I correct in thinking that the code below should indeed be over writing the temp file indig 's name to IndDM by basically over writing it? All it appears to do when ran is delete a file completely :s

    Java Code:
     File oldName = new File("C:\\IndDM.xml");
          File newName = new File("C:\\indig.xml");
    if(oldName.delete()){
    		  newName.renameTo(oldName);
    		System.out.println("deleted");
    		}

Similar Threads

  1. Replies: 0
    Last Post: 09-12-2014, 01:07 PM
  2. karel the robot - are methods case sensitive?
    By Roee Yossef in forum New To Java
    Replies: 1
    Last Post: 11-07-2011, 09:23 AM
  3. Problem with case sensitive input
    By mehnihma in forum New To Java
    Replies: 12
    Last Post: 10-30-2011, 05:49 PM
  4. Is Java Case Sensitive???? Prove It
    By j2vdk in forum New To Java
    Replies: 53
    Last Post: 09-01-2008, 10:54 AM
  5. MySQL Case Sensitive Problem
    By techissue2008 in forum JDBC
    Replies: 1
    Last Post: 06-10-2008, 07:23 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •