Need Help - Problem: Cannot rename the file

I hv three type of file, which is original file, processed file and edited file. Then, my goal is change all the three type of filename after i edit and save the document...
My problem is sometime it can be changed, but sometime it just change either one or two type of filename only.....
Can somebody to help me........10s first....
Below is my coding.....
String nfilename = tokenString[0] + "_edited";
File original = new File(directoryname + "\\" + "original" + "\\" + tokenString[0] + ".txt");                     
File noriginal = new File (directoryname + "\\" + "original" + "\\" + nfilename + ".txt");
boolean success1 = original.renameTo(noriginal);
File process = new File(directoryname + "\\" + "process" + "\\" + tokenString[0] + ".xml");                         
File nprocess = new File (directoryname + "\\" + "process" + "\\" + nfilename + ".xml");
boolean success2 = process.renameTo(nprocess);
File edit = new File(directoryname + "\\" + "edit" + "\\" + tokenString[0] + ".xml");
File nedit = new File(directoryname + "\\" + "edit" + "\\" + nfilename + ".xml");                     
boolean success3 = edit.renameTo(nedit);

I have some problem when I rename file that have filename in thai language.
I think may be it's depend on locale, I changed locale to TH but it's not work yet.
some body help me

Similar Messages

  • I actually need help but cannot find the answer. Please.......Lately when open a new tab it does not open with a blank page. I don't want to set my homepage as

    I actually need help but cannot find the answer.
    Please.......Lately when open a new tab it does not open with a blank page. I don't want to set my homepage as blank as when I first open Firefox, it automatically loads my hotmail page. But then if I open other pages I don't get a blank page. Help, please?
    Thank you.
    ''[Personal information removed by moderator. Please read [[Forum and chat rules and guidelines]], thanks.]''

    hello, please refer to [[New Tab Page – show, hide and customize top sites]] in order to switch the feature off.

  • I had to put my computer by together without migration or time machine I NEED help with order of the files?

    I had to put my computer by together without migration or time machine I NEED help with order of the files?

    Hi, where are these other files exactly?

  • Weird flashing problem - cannot rename any file or folder in Movies

    I have a problem affecting just my Movies folder. Whenever I view it in the Finder, the edge of the Finder window will flash once every four seconds. If I am trying to rename an item within the Movies folder when the flash happens, I get dumped out of the name editor and the file or folder is given the partially-typed name.
    It only happens when I'm viewing the Movies folder in the Finder. Any ideas?
    Message was edited by: Gareth Randall2

    What do you mean by "flashing"? Can you post a video or photos for us to see?

  • Getting error "Cannot open the file "*****.INDD". Adobe InDesign may not support the file format, a plug-in that supports the file format may be missing, or the file may be open in another application."

    How to fix this problem
    "Cannot open the file "*****.INDD". Adobe InDesign may not support the file format, a plug-in that supports the file format may be missing, or the file may be open in another application."

    When I have seen this message it is either when I try to open a document with an older version of Indesign E.g. an indesign 2014 document with Indesign CC.
    The other time I have seen it is to open an Indesign CC document with Indesign 2014 which does not have Mindsuite - a plugin I use. Mindsuite, as yet, has not upgrade the plugin for Indesign 2014 therefore it recognises that a the document was created withe a plugin that the 2014 version does not have installed.
    I believe your problem will be something like that.

  • Error:Cannot open the file c:\windows\sapmmc.msc

    Hi Folks,
    I have been using SAP IDES ECC 6.2 for a while and now all of a sudden encountered a problem CANNOT OPEN THE FILE C:\WINDOWS\SAPMMC.MSC.
    I am a technical consultant and i know nothing about basis and sap installations.
    Is this error so fatal? How can i fix the problem..
    Thanks in advance.
    Ranjith kumar.

    Hi
    Ranjith
    Hi,
    Looks like your mmc dll is corrupted, with your install and uninstall of software.
    Two Options:
    1. Upgrade the Kernel with latest Patch level, which comes with new SAPMMC.dll file
    OR
    2. Just download the SAPMMC*.sar file from service market place and extract in exe directory, since it is windows re-booting the server doesn't hurt.
    Regards
    Bhaskar

  • Excel cannot open the file beacuse the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file [help]

    Hi,
    I have a excel file that I have been using since beginning of year.
    Yesterday, I tried to open it but a message comes out "
    Excel cannot open the file beacuse the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file"
    After I click yes, the page is blank. The file is about 400kb in size.
    I have try open and repair and third party repair program and not working also.
    I would appreciate a lot if you can help me.
    Thank you very much.

    Per your post, this problem might be caused by malware on the affected machine.
    http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2013/09/07/quot-cannot-open-the-file-because-the-file-format-or-extension-is-invalid-quot-opening-office-files.aspx
    In order to clean your machine, run Microsoft Safety Scanner (http://www.microsoft.com/security/scanner/en-us/default.aspx) to kill the malware, and then repair Excel file itself.
    If this is not the case, feel free to post back and let me know. Thanks.
    Tony Chen
    TechNet Community Support
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • A client has sent me an indesign file I cannot open. She says she has updated to Indesign CC 2014. I am a CC member and fully updated my own software but cannot open the file she has sent me, not even if she saves as an IDML, how do I resolve the problem?

    A client has sent me an indesign file I cannot open. She says she has updated to Indesign CC 2014. I am a CC member and fully updated my own software but cannot open the file she has sent me, not even if she saves as an IDML, how do I resolve the problem?

    There are a few things to try.
    First, if this file came to you vial email attachment, it could have been corrupted. Ask her to zip the file and send it again. That sometimes helps.
    I suppose there's a chance that the file is already zipped, so see if that's the case and unzip it if so.
    If the file name doesn't end with .indd, add it and see if that helps.
    If you are double-clicking, try File>Open from within InDesign.
    Last (and I know this sounds like a joke, but I've seen it many times), sometimes people attach a Mac Alias or Windows Shortcut instead of the actual file. What is the file size? If it's really small, that might be the reason.
    Also, no offense intended if some of this sounds like stuff you have already tried. I don't know what you know, so I'm just spit-balling.

  • Need help to share Number/Pages file visa Mail option. Cannot do with iPad Air (iOS7)

    Need help to share Number/Pages file visa Mail option. Cannot do with iPad Air

    Oh, okay. After selecting the format I want to send, it says "creating... ". Then irrespective of the format I choose the message e.g. "creating spreadsheet" disappears, and so does the choice window (where I earlier chose Mail). I am taken back to the Numbers (or Page) where I had started from. Diavonex's note indicated that after "creating ... " stage I should be taken to an option where I can type in email address where I want to  send the  file, if I want to copy it to another address etc. I cannot arrive at that page - no matter whether I am working with Pages or Number, or which format I choose for the file to share !
    I will try to close as you have suggested and try. However, I have switched on and off several times by now, but nothing changed!
    Will look forward to any ideas to solve this !!!
    Thanks much!
    Best

  • When I open iPhoto 9.2.1 it says that my library needs to be upgraded but when I upgrade the library I am trying to open (33 GB worth of pictures from 2006) the new application says it cannot read the files and how to find them on the system to reimport?!

    When I open iPhoto 9.2.1 it says that my library needs to be upgraded but when I upgrade the library I am trying to open (33 GB worth of pictures from 2006) the new application says it cannot read the files and how to find them on the system to reimport?! and then I'd like to erase the original files since the space requirement is huge!!!! Why is upgrading software iPhoto such a pain. I've gotta get a presentation done and all I get for my money is roadblock!!!

    hello, it sounds like the library is damaged.
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. 

  • HT3775 I have a bunch of .MOD files I cannot play from our Canon video cam. I tried renaming the files as MPEG or MOV, I get the message "The document "001.MPEG" could not be opened. A required codec isn't available." Any advice on getting these to play?

    I have a slew of .MOD files I cannot play from our Canon video cam. I tried renaming the files as MPEG or MOV, I get the message "The document “001.MPEG” could not be opened. A required codec isn't available." Any advice on getting these to play? Thanks!

    Try installing Perian or VLC. Some AVIs require a codec which simply isn't available for Mac OS X.
    (85018)

  • My itunes cannot be update on my windows xp. so i delete my itunes and install new, but now i got new problems, it says "The file itune.library.itl cannot be read because it was created by newer version of itunes." so how can it be solved?

    my itunes cannot be update on my windows xp. so i delete my itunes and install new, but now i got new problems, it says "The file itune.library.itl cannot be read because it was created by newer version of itunes." so how can it be solved?

    Hello Bebyida,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    http://www.apple.com/itunes/download/
    Best of luck,
    Mario

  • I am on a trial version of  InDesign in Creative Cloud and before I purchase need to know why and the files cannot be opened by others using CS6.  Isn't Cloud compatible with CS6 design software?

    I am on a trial version of  InDesign in Creative Cloud and before I purchase need to know why and the files cannot be opened by others using CS6.  Isn't Cloud compatible with CS6 design software?

    Industry standard files such as JPEG are compatible with many brands/versions of programs
    Proprietary files such as those created by InDesign are often not backwards compatible, due to new features in newer program versions
    This is not unique to Adobe... MS Word DOCX files are not backwards compatible with earlier versions of MS Word

  • Please help i cannot open the pdf files of cic.gc.ca

    please help i cannot open the pdf files of cic.gc.ca

    Hi ooovvvaaaiiisss12345.
    Are you trying to view the pdf's from the browser are after downloading it and viewing via Reader.
    Please let me know the OS and browser you are using.
    Are you able to view the pdf's on other websites?
    Let me know what errors you get while viewing the pdf's

  • I cannot add the file to file sharing, pls help

    Hi, I have install cloudreader, goodreader, oplayer and quickoffice... etc and work fine before, today just install pdf reader lite to my ipad, the filesharing in itunes suddently have problem, all the file cannot show in application file.... cannot add the file too, after remove the pdf reader lite the problem still remain, after uninstall and reinstall itunes problem still there.... anyone have same experience? how to solve it? pls help

    Hello AAA821
    You can download them directly to your other iOS devices by following the steps in the article below.
    Downloading past purchases from the iTunes Store, App Store, and iBooks Store
    http://support.apple.com/kb/ht4211
    Regards,
    -Norm G

Maybe you are looking for