RENAMING IMAGE

File imgf     =     new File(fE:\\test\\mypkg\\old.jpg");
imgf.renameTo(new File("E:\\test\\mypkg\\new.jpg");
i can not rename to image.......
help , ASAP

It isn't polite to require answers ASAP, and it doesn't help to say that you need something ASAP.
What happens when you execute the code?

Similar Messages

  • Moving and renaming image files

    I want to move & rename image files to folders on the hard drive by dragging and dropping them into my application. I read about the problem with renameTo() method with windows. Is this possible to do in java? I heard about a method in which you read,write and delete the old file? How do I go about making this happen?

    Well, what happens if you create the folder C:/Test/testfile1.txt ?
    Or alternatively remove the part that says "testfile1.txt" from the directory path in your program.
    Or alternatively call dir.mkdirs() before trying to rename.
    What I am getting at is that when you create a file with the constructornew File(dir,newdest.getName())the parameter dir is treated as a directory no matter what its name is. If its name is "C:/Test/testfile1.txt," the name of the new file will be "C:/Test/testfile1.txt/name_of_newdest"where name_of_newdest is the name of the "newdest" file. This might not be what you wanted

  • I have created a folder and album where I've renamed the images, yet when I export them, the default to their original numbering. How can I block that so I can keep the newly renamed images as I've renamed them?

    I have created a folder and album where I've renamed the images, yet when I export them, the default to their original numbering. How can I block that so I can keep the newly renamed images as I've renamed them?

    As TD pointed out:
    OT

  • Is it possible to delete or rename images or videos on the Touch?

    Is it possible to delete or rename images or videos on the Touch?

    it is posibile for videos and pictures too, I found it the other day on http://www.ipodtouchtricks.blogspot.com just search somewhere on that blog it will guide you step by step.

  • Renaming Images from Text File

    Hello,
    I am trying to rename images in a folder to match the names within in a text file. The names in the text file are all unique, so using a rename batch like example-1.jpg, example-2.jpg, etc. won't work. I have matched the structure between both the name and image file, so I need automator to traverse down the text file and add each unique name to the corresponding image.
    If anyone has some help for this it will greatly be appreciated! Thanks

    I wrote you a shell script that will do the job.
    First, put all your images into a folder (if you haven't already done so). Make a copy of the folder for safety's sake (I tested the script and it should work fine, but it's always good to have a backup).
    Now, make sure each new name in the text file is on its own line. Rename the file to "list.txt" and put it in the same folder as the images (better make a copy of the list, too).
    Now, download this file: http://danielrichman.com/tmp/file_rename.sh
    Put it in the same folder as your images.
    Now, open Applications -> Utilities -> Terminal and type the following (without quotes):
    "cd "
    Then open up the Finder window that contains the images. In the title bar of the window, there's a little folder icon. Drag the icon into the Terminal window. (You should see the path copied.)
    Then, in Terminal, press enter.
    Then copy this (and press enter at the end):
    "chmod a+x ./file_rename.sh"
    Then, do this:
    "./file_rename.sh"
    That should be it! Please let me know how it goes.
    Good luck!
    ddr

  • I accidently renamed image folders in bridge and cannot access the folder images.

    I accidently renamed image folders in bridge and can no longer access the folders. Is there a way to get the images back?

    On what Mac using what version of OS X?

  • Cant move or rename  images or folders from within lightroom 5.

    Lightroom wont allow me to move or rename either single images or folders within lightroom. Keep getting an unknown error occurred message. All images are currently on an external hard drive. Any ideas?

    Yes. All images are imported into lightroom and editable. Green light is also showing on the folders tab just the same as with my c drive. I can move/rename images and folders etc from explorer but then have to locate them for lightroom to find.

  • Renaming images

    Hi there,
    I've renamed images in iPhoto by first creating a new folder, duplicating the images I wanted to rename and placing them in that folder, and then selecting each image and clicking on title under the information box in the lower lefthand corner of the screen. This was very time-consuming to do for each and every image (all 2053 of them!).
    1. Is there a way to do a batch change in on a large group of pictures without exporting them to photoshop?
    2. Also, after I named the images and saved them they are exactly the same image size (4288 x 2848 ppi) but the memory size is larger (ie. what started out as a 3.2MB image is now a 4.9MB) so now my folder size for all of the images is a total of 10.1GB instead of the original 7.5GB. What's up with this? Did the computer add new information to the images that isn't showing up?
    I didn't do anything at all to the images other than to duplicate them and then rename them. I would like to erase one of the folders but am afraid to for fear that the newer folder (the one I would like to keep) has images that are somehow damaged/degraded in quality. I desperately want to get all of these extra pictures off of my hard drive before I run out of room and the ability to do anything on the computer so I need to fix this sooner than later. Please advise--thanks!!!!
    Elizabeth

    What is the point of renaming photos if you are not renaming the file?
    A photo and a file are not the same thing. A file contains a photo, but that is not at all the same as saying the photo is the file, any more than your Novel is a word processing document.
    Organisation in iPhoto is all about the Picture, not the file. If you want to organise by file use a File Organiser. In the case of the Mac this would be the Finder. But if you go back to the old Shoe Box filled with photos, that's rather akin to trying to organise them by looking at the back of the print. iPhoto is graphical - look at the pictures, the filename doesn't matter.
    Then if you want to access the pic, you do it graphically - by using iPhoto or a media browser that accesses the iPhoto library:
    There are many, many ways to access your files in iPhoto:
    For 10.5 users: You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Apple-Click for selecting multiple pics.
    To upload to a site that does not have an iPhoto Export Plug-in the recommended way is to Select the Pic in the iPhoto Window and go File -> Export and export the pic to the desktop, then upload from there. After the upload you can trash the pic on the desktop. It's only a copy and your original is safe in iPhoto.
    This is also true for emailing with Web-based services. If you're using Gmail you can use THIS
    If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    Or, if you want to access the files with iPhoto not running, then create a Media Browser using Automator (takes about 10 seconds) or use THIS
    Other options include:
    1. *Drag and Drop*: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. *File -> Export*: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    3. *Show File*: Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected.
    So at no point in either importing or manipulating the pics is the file name of any relevance.
    That's why.
    Regards
    TD

  • Renaming image files - LR doesn't accept preceding zeros

    I have finished editing in the develop modules & deleted some additional photos in the shoot during the editing process. I do review & delete most of my unwanted images in advance, so please don't lecture me on this!
    Anyway, I went to the library module, selected all, & hit F2 to batch rename all selected images (DNG) in sequence. My problem is this - LR won't accept preceding zeros in the Start Number box. I would like for the first image to have 3 digits - that is: 001. LR eliminates the zeros, resulting in a single digit "1" instead.
    Is there a workaround for this?
    I can rename the images using another program I have, but I'm afraid that the editing adjustments performed in LR may get jumbled.

    Thanks, Dharma Sam!
    I never bothered to go into the edit > custom settings!    DUH!
    That enabled me to get the results I wanted.

  • Renaming image files

    I'm using iWeb 1.1.2 If I click on the metrics tab under "Inspector", it will list the name of any image file I select. Is there any way to change the name of an image file without removing it from iWeb, changing it, then re-inserting it into iWeb?
    Some of my image file names consist of several words and a date. I need to shorten names and eliminate spaces between words or numerals.
    Help would be appreciated.
    LaughingBear

    Hello Old Toad,
    The images are interspersed with text on regular webpages, not in albums or anything fancy.
    Yes, I tried changing names in the Domain files, but that just confused the index.html file, ruining the webpage.
    The URL is bear-viewing-in-alaska.info.
    That site is hosted by Yahoo. My iWeb site was created through iMac and then transferred automatically to Mobile Me.
    Since search engines have great difficulty finding that content, I have been trying to transfer my pages from Mobile Me to Yahoo. But Yahoo cannot read file names that contain spaces or "&" signs, which some of my photos have. So I have been trying to rename the image files.
    Put differently, I'm trying to get all of my pages into a single website (rather than 2 inter-linked websites), if not with Yahoo than with some other host that is search-engine-friendly. I initially tried shifting to RAGE, but they were just starting up as a host and did not seem to have their act together yet.
    Given my desire to switch hosts, I have not paid Mobile Me for another year; so the webpages I created on iWeb cannot be viewed there. However, I've managed to transfer a few files to the Yahoo website. You will find them by clicking on "Senior Staff" near the upper right of the homepage, then clicking on "Author." That will lead to a series of images of artwork I've created.
    Look forward to your insights.
    Laughing Bear

  • Renaming image files in aperture?

    how do I rename my image files. I need to do this in order for my photos to be accepted in 'Hugin'. at the moment it says error, this file contains invalid characters, hugin can't use files with these filenames, please rename files. what do I do? 

    When you export the version from Aperture you are free to name the exported version anything you wish. Use a format that is acceptable to the site you are sending  the files to.
    Or else just rename the already exported images using the finder.

  • Batch Rename Images

    I'm trying out PSE11 at the moment and it does look and feel nice. I have my photos in various folders followed by a folder named as the year so i have everything in years.
    Example :- Photos_2010
                          01_01_10
                          02_01_10 etc.
    When i import the photos into the organizer i want to rename the photos to something like Photo0001 and 02 etc. (25 images in the first folder)
    When i then import photos from the 02_01_10 folder i want that to start at the next number (Photo0026, 27 etc.
    How do i go about naming them as Photo as it puts a - after the name, all i want is Photo00001 etc. and how do i get the number count to increment from the last number - Is this possible ?
    Thanks,
    Mark

    It does exactly what i need but when i import from a folder after they are named accordingly it doesn't show the Year 2010 as the top folder - Example
    Top folder 2010_Photos Sub Folder 06_03_2010 Under My Folders on the left hand side it only shows 06_03_2010
    How do get it to display 2010_Photos with 06_03_10 underneath.
    Also when i preview the thumbnails they are not displayed in file name order. It starts with Photo0035, 36 etc. at the top - I want it to start with Photo0001,0002 etc. If it's displayed in order it's easier to see what the next starting number will be when i run Process Multiple Files for another folder.

  • Batch Renaming Image Files from a list of names

    I would like to use the batch rename function in Bridge CS5 to quickly rename newly uploaded image files of our products.  I would like to rename the image to it's corresponding product number.  The issue is that the product numbers aren't in exact numerical order (ie.  the first pic is of product ES2004 and the next one is for ES2012).  The product numbers can sometimes end with a letter or a number.  The pictures are taken in order of the product numbers on an excel sheet.  What's the easiest way to have bridge name the image file to its corresponding part number? 

    Here is an example script that will do the re-naming also place the original filename into the metadata.
    CSV format is fileName,Product IE:
    p1020337.jpg,E179562
    p1020338.jpg,Z556301
    Copy and paste the script into ExtendScript Toolkit (This gets installed with Photoshop)
    Open Bridge
    Edit > Preferences > Startup Scripts
    Click "Reveal My Startup Script"
    Save the script into this folder.
    Close and restart Bridge and accept the new script.
    To use, navigate to the folder with the documents to rename, "Right mouse click Menu" select "Rename to Product" and select your csv file.
    #target bridge 
    if( BridgeTalk.appName == "bridge" ) { 
    fileNameToProduct = MenuElement.create("command", "Rename to Product", "at the end of Thumbnail");
    fileNameToProduct.onSelect = function () {
       renameToProduct();
    function renameToProduct(){
    var Path =app.document.presentationPath;
    var descFile = File.openDialog("Open Product File","CSV File(*.csv):*.csv;");
    if(descFile == null) return;
    descFile.open('r');
    var datFile=[];
    while(!descFile.eof){
    var line = descFile.readln();
    if(line.length > 5) datFile.push(line);
    descFile.close();
    for(var t in datFile){
    var str=datFile[t];
    str= str.split(',');
    var fileName = File(Path+"/"+ str.shift());
    var product = str.shift();
    if(!fileName.exists) continue;
    var ext = fileName.toString().toLowerCase().match(/[^\.]+$/);
    var thumb  = new Thumbnail(fileName);
    var md = thumb.synchronousMetadata;
    md.namespace = "http://ns.adobe.com/xap/1.0/mm/";
    md.PreservedFileName = thumb.name;
    $.sleep(100); //give it time to update the metadata
    var newName = product + "." +ext;
    fileName.rename(newName);
    alert("All done");

  • Rename Images while Exporting

    n Lightroom, I want to rename my images, based upon the image name and its mapping in a CSV file. Ideally, I would want something like this:
    When the user after editing goes to Export under File menu. Inside the File Naming panel above, one should be able to input the CSV file containing the mapping. Hence once exported, the new Images will be named consistently with what I need rather than the default ones provided by LightRoom.
    Using the plugin LRTransporter one can do it while Importing images (storing the new name under Caption and then renaming all using Batch Rename). But it is tedious.
    What I need to know is that, can we build such plugin which can do it? If yes I would move ahead with constructing it.

    If you are writing the export service, you can name exported files however you want. But, there is no "thoroughly good" way to do it as an export filter (that I am aware of), since each stage must comply with the terms of the downstream stage (e.g. export service), including filename/path expectations.
    Nevertheless, subject to some caveats, there is some latitude:
    Consider as example:
    Exportant
    which supports generic export naming as export filter (post-process action) - read the fine print before using...
    Rob

  • Bridge CS5 HTML Web Gallery renames images.

    When creating an HTML Web Gallery (using ‘Lightroom’ template), Bridge CS5 renames the thumbs and large images to an arbitrary number.  The caption reads as the original file name, but the actual image has a new name.  This is problematic, as my clients will right-click selected images from my galleries to save and forward for approval, but the file name is not the same as the original.
    Is there any way to fix this little (for me--BIG) problem?

    No way to change it, it's a "feature."  (Not!)
    File a bug report.  It makes web galleries useless for me.
    --Rich Wagner

Maybe you are looking for

  • Import from full export

    Dears i have dmp file exported by command: exp system/pass@dbname file=exp_full_ORCL.dmp full=y log=exp_full_ORCL.log. its exported from Oracle 10.2.0.3 running on Redhat Enterprise Linux ver 5 with multiple Schemas and users then i did install Oracl

  • Macbook sleep wake up with lid closed

    Hi everybody. Since 10.9 I had a strange issue with sleep on my MBP 15. If I put it in sleep with the button and I close the lid, it will wake up closed waiting for the password. Also, if it is in sleep while charging, or charged, and I plug off the

  • T61 and dual displays

    Hi there I have a T61 which a dock and two external monitors connected.  HP L2035 (1600x1200) on the DVI and Dell 1907FP on the VGA.  Everything used to work just fine, until some windows update was installed few days ago. Now I can't get the HP disp

  • Error in Career and Job= Skills Profile

    I have the following issue: In the application of Career and Job=>Skills Profile. When I want add a new qualification, the system display the following message of error: Root Cause The initial exception that caused the request to fail, was:    java.l

  • Notes not syncing

    I use Mail and also use it for Notes. I can NOT get my notes to sync to my iPhone 3GS. I've got it checked in iTunes and have also tried checking the "Replace information on this phone" option in iTunes. How do I sync my notes?? Thanks.