Batch Rename - Two File Formats with Same Name

Hi everyone!
I'm having troubles using the batch rename function i Bridge CS5.
I've got several pictures that I've captured in both jpeg and raw. When importing the pics with windows photo import they get the same name. This means that I've got one JPG and one RAW file which contains the "same" picture, and have same name as shown below:
What I would like to do is to rename the pictures, but still have Bridge name the same pictures with the same name as shown below:
     IMG_1268.CR2          ->          Picture 2011 - 0001
     IMG_1268.JPG          ->          Picture 2011 - 0001
     IMG_1269.CR2          ->          Picture 2011 - 0002
     IMG_1269.JPG          ->          Picture 2011 - 0002
Is this even possible? And if possible, how?
Thanks in advance
Martin

Most things are possible and so is this..
Make sure you do a test first by copying the files to a temp folder!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
First copy the script below and paste it into ExtendScript Toolkit (this gets installed with Photoshop)
#target bridge
var sels = app.document.selections;
for(var a in sels){
var f = decodeURI(sels[a].spec.name);
var newName = "Picture 2011 - "+ zeroPad((f.match(/\d{4}/)[0]-1267).toString(),4)+ f.match(/\....$/);
sels[a].spec.rename(newName);
function zeroPad(n, s) {
   n = n.toString();
   while (n.length < s)  n = '0' + n;
   return n;
Now open Bridge and select the files you want to rename, then run the above script from ExtendScript Toolkit.

Similar Messages

  • Two soa domain with same name "TestSOADomain" sharing same SOA schema ?

    I tried creating two soa domain with same name "TestSOADomain" (different path) sharing same SOA schema .However one domain came UP to Running mode and other domain going to AdminMode and "soa-infra" application of that domain is not active.
    I do want to understand can this be possible with SOA ,ie. two soa domain sharing same SOA schema ?
    If possible what are all the problems might come
    1. While executing soa composites with asyncronous behaviour ?
    2. How the polling services will work ?
    3. will the XREF_DATA table ROW_NUMBER column inserted uniquely while inserting data from two different domain into same SOA schema ?
    4. Other issues ?
    Thanks

    Each domain is expected to refer to its own unique database schema. Same SOA schema should not be shared by multiple SOA clusters/domains. It is technically possible though, I suppose, and still can run fine any one SOA environment at any given time with the other SOA environments/domains (sharing the same SOA schema) shutdown. It is not the general/recommended practice to share SOA schema across domains and there could be potential implications and unexpected behavior, particularly when the SOA environments pointing to the same schema are all running at a time.

  • Reflection - Two packages/classes with same name

    Hi There !
    I am in a situation and I need some help, if anyone can help me.
    I have two tools to work with different version of a server application. Now, the admin wants to have only one tool to work with both server app.
    The problem is that the server app has a jar file with the API to be used to access it. One jar for each version.
    Inside those jars files I have the same package and the same class ! But the implementation is diferent. So I will need to access one jar when accessing the old server app and another jar to access the new server app.
    I have no idea how to do it.
    I search arround google and I found that I can load a class at runtime and then with Reflection call its methods.
    I made a test app (simple, just 2 different jars with same package and class name just printing a Hello World and Bye World) and it worked very well.
    But when I tried to apply this to my code, I realize that one class need the reference of the other class...
    For example, I have a class named Server and other called ServerStatus.
    The Server class do the connection to the server and the ServerStatus get some server information. But the method that give me this information has a argument asking for an object of Server... like this:
    Server serv = new Server();
    serv.connect();
    ServerStatus servStat = new ServerStatus();
    servStat.getServerStatus(serv);I tried to do this with reflection but in the part that I need to invoke the method getServerStatus, I do not have the name of the class that is the argument (in this case Server).
    Something like this:
       Method  m = serverClass.getMethod("getServerStatus", new Class[] {?????.class});
             result = (Boolean)m.invoke(server, new Object[] {serverStatus});Do you have any ideiias to resolve this ?
    Or something different from reflection to access two different implementations with same package and class name ?
    If you need any other information, please ask me..
    Thank you so much !
    Regards,
    Thiago

    Thiago wrote:
    Hi.
    But now, how can I handle the object (because the newInstance() return a Object object.... not the class that I want (Server, for example)).
    When you declare a reference to be something more narrow than "Object" you're telling the compiler what methods and fields the referenced object supports. With a dynamically loaded class you can't do that at compile time, because the nature of the class isn't known until you load it at runtime.
    That's why it's very handy if you know that the class you are to load implements some interface which is known at compile time. Then you can access the object through a reference to that interface.
    Otherwise there's really no option but to handle the object through reflection. Find methods with getMethod() on the Class object and invoke them with Method.invoke().
    There are tricks to impose an interface onto a dynamically loaded class at runtime, but they are just neat ways of working through reflection.

  • Problem in importing two different classes with same name...

    I have to import two different classes in my program with the same name....
    import org.apache.lucene.document.Document;
    import org.w3c.dom.Document;
    //    I AM USING THE DOCUMENT FROM W3C PACKAGE HERE....
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                     DocumentBuilder builder = factory.newDocumentBuilder();
                     InputSource is = new InputSource( new StringReader( tempString ) );
                     d = builder.parse( is );
                     NodeList images = d.getElementsByTagName("img");
                     int length = images.getLength();
                     for(int i = 0;i<length;i++)
                         Node image = images.item(i);
                         String tempAltText = image.getAttributes().getNamedItem("alt").getNodeValue();
                         altText = altText.concat(" ").concat(tempAltText);
                     }and the error i am getting is
    [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:20: org.apache.lucene.document.Document is already defined in a single-type import
        [javac] import org.w3c.dom.Document;
        [javac] ^
        [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:132: incompatible types
        [javac] found   : org.w3c.dom.Document
        [javac] required: org.apache.lucene.document.Document
        [javac] d = builder.parse( is );
        [javac] ^
        [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:133: cannot find symbol
        [javac] symbol  : method getElementsByTagName(java.lang.String)
        [javac] location: class org.apache.lucene.document.Document
        [javac] NodeList images = d.getElementsByTagName("img");
        [javac] ^
        [javac] Note: Some input files use unchecked or unsafe operations.
        [javac] Note: Recompile with -Xlint:unchecked for details.
        [javac] 3 errorsany idea ..how to resolve it
    Edited by: ping.sumit on Jul 16, 2008 3:39 PM
    Edited by: ping.sumit on Jul 16, 2008 3:40 PM

    now i changed the code to
    import org.apache.lucene.document.Document;
    import org.w3c.dom.Document;
    org.w3c.dom.Document d = null;
    try{
         System.out.println("in author");
                   URL url = new java.net.URL(urlString);
                   java.net.URLConnection conn = url.openConnection();
                   BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                   while ((in.readLine()) != null)
                        //tempString = tempString.concat(in.readLine());
                        String temp = in.readLine();
                        tempString = tempString + " " + temp;
                   System.out.println("the string in author" + tempString);
                    in.close();
                    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                     DocumentBuilder builder = factory.newDocumentBuilder();
                     InputSource is = new InputSource( new StringReader( tempString ) );
                     d = builder.parse( is );
                     NodeList images = d.getElementsByTagName("img");and their is only one error i am getting ...and that is
    [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:20: org.apache.lucene.document.Document is already defined in a single-type import
        [javac] import org.w3c.dom.Document;
        [javac] ^
        [javac] Note: Some input files use unchecked or unsafe operations.
        [javac] Note: Recompile with -Xlint:unchecked for details.
        [javac] 1 error

  • Responding to two user events with same name

    LV 2013, Win 7, & LVRT 2013, PharLap OS
    I have a situation where I create an ARRAY of User Events, one for each "domain" .  
    A "domain" is an area of DAQ: there is a SCXI domain, a CDAQ domain, an EtherCAT domain, several domains dealing with TCP instruments etc., about 25 domains all told. The name of the event is "New Channels This Domain".
    When a new configuration comes to the PXI from the host, I sort out the channels by their domain and generate a user event for whichever domains have channels that have changed: more channels, fewer channels, differences. If a domain has no channels that have changed, I do not generate an event for it.
    There is a handler for each domain: in that handler, I pick out the event for this domain from the array, and register to receive it.  I have an event structure that responds to the NEW CHANNELS THIS DOMAIN event.  Since it is an array, then no matter which domain I select, the name of the array is "New Channels This Domain".
    All this works fine.
    Now I have a situation where it makes sense to have one handler for TWO domains.
    I can pick out TWO elements of the array just fine, and register them both.   (See attached pic)  But now, in the EDIT EVENTS FOR THIS CASE list, I have TWO events called "New Channels This Domain".  I can select one for one case, and the other for the other case and it seems to work.
    --- Is there any heartache ahead with this scheme?  
    --- If I change the events in the clusters before, is it going to confuse LabVIEW?  
    --- Is there something I can do to change the name of the event after I pick it out of the array?  
    --- Is there something I SHOULD do at that point?
    Like I said, it seems to work, but I'm leery of it staying that way - I've had event structures disturbed before (LV2010) when changing cluster order.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    CoastalMaineBird wrote:
    Thanks, Greg for that link.  I gave kudos to the idea of the COERCE TO TYPE function, and it seems like it would do the trick, but as of LV2014 it's still not on the palette.
    My question still remains: is it necessary?  Will the event structure remember that it's supposed to use the SECOND event named "X", through all edits and recompiles?  My guess is no, but I'll listen to alternative stories.
    I've been using the Coerce to type for this and enums in versions 2011 through 2014 since learning about it.  I've seen no issue using it in these cases.  I'm guessing it doesn't behave in an expected way for extreame uses which is why NI doesn't release it yet.
    As for would it always know to go to the second event if they are named the same?  My guess is yes.  They maybe named the same but they have different references.  I would think it would be just like having two controls with the same label.  You should never do this, but if you did, and made a local variables on one and wrote to it, it would always write to the correct control.  It would never write to the different control with the same name.  Now even if this is the case it could be confusing to a developer looking at the code, which is why I strongly suggest having unique names.  But if you don't I suspect every thing would work fine, just have a bold comment or something explaining what each case actually is handling.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Can I have two Aperture projects with same name?

    Hi. I'm new to Aperture and an advanced iPhoto user. I started using Aperture sharing the same library with iPhoto (that new functionallity).
    I've read lots of manuals and tutorials (Apple's and others) as well as this support topics. I understand iPhoto Events are now Aperture Projects and I've read a lot about how should it be organized and so on.
    My problem is: I got, for example, 4 iPhoto Events with the name "Friends". The appear in Apperture as 4 Projects named "Friends". I decided to rename one of them and the I came back to "Friends" name. Aperture won't let me: it appends "(1)". It seems I cannot name to Projects the same way, although I have that.
    Before: Friends, Friends, Friends, Friends
    After renaming one of them and trying to get back to original name: Friends, Friends, Friends, Friends (1)
    I have that duplicated name because it is like a title, photos of my friends in different time (one Friends is from 2005, other from 2010, and so on, for example).
    It seems pretty bad I have to come up with a new name for each new Project, considering I have hundreds of them today. Any tips? Thanks.

    If there is nothing separating the images then put them all in the same project. If you have a project Friends you know all your friends images are in there and you can find the ones you want by date or keyword or even Face.
    There is no requirement to have the images from different times at the bar to be in different projects. I personally wouldn't work that way but if having a project called Friends at Bar works for you then place all the images of your friends at the bar in that project.
    Of course another way to look at this is to use albums to pull all the images of your Friends at Bars together. Don't have the name of the project organize your library, create albums and/or smart albums to collect the images into meaningful groupings.
    regards

  • Two mail accounts with same name and SSL not allowed?!

    Dear Common Wisdom:
    I have two accounts in my Mail program with the same web host. That means the outgoing mail server has the same name.
    If I put on SSL, though, it is not allowed to save two servers with the same name in two different accounts.
    Can I get around this and still use SSL for both accounts?
    Thanks!
    Kostas

    Each domain is expected to refer to its own unique database schema. Same SOA schema should not be shared by multiple SOA clusters/domains. It is technically possible though, I suppose, and still can run fine any one SOA environment at any given time with the other SOA environments/domains (sharing the same SOA schema) shutdown. It is not the general/recommended practice to share SOA schema across domains and there could be potential implications and unexpected behavior, particularly when the SOA environments pointing to the same schema are all running at a time.

  • Need help renaming a file to the same name as folder.

    I am looking to loop through a directory full of folders each containing one file. I am wanting to change each file name in each folder to the same name as the folder. The code compiles fine, it just never actually does anything. Here is my code.
    import javax.swing.JOptionPane;
    import java.io.File;
    public class filing
         public static void main (String [ ] args)
              File dir = new File("C:\\testing");
              File file;
              File cf;
              String dirs[ ] = dir.list();
              String folderName = "";
              if (dirs == null)
                   JOptionPane.showMessageDialog(null, "Directory does not exist", "I can't find it", JOptionPane.WARNING_MESSAGE);
              else
                   for (int i=0; i<dirs.length; i++)
                        folderName = dirs[ i ];
                        file = new File("C:\\testing\\"+folderName);
                        String changeFile[ ] = file.list();
                        cf=new File(changeFile[0]);
                        cf.renameTo(new File("C:\\testing\\"+folderName+".txt"));
              System.exit(0);
    }

    Nevermind. I figured it out.
    Instead of cf=new File (changeFile[0]);
    I added cf = new File ("C:\\testing\\"+folderName+"\\"+changeFile[0]);
    thanks anyway!

  • Is it OK to have two SBS Servers with same name, on different subnets but connected over a VPN?

    Hi Everyone,
                       I'm just about to connect up two SBS 2011 Servers with the same server name but on different subnets & domains over a VPN.
    So for example both servers will have the name Server01, one would have an ip address of 192.168.85.5, the other 192.168.86.5, they both then would be connected over a VPN.
    Can anyone foresee any issues with this configuration, like DNS & DHCP requests, adding new machines to the domain, mapping drives etc.
    Many thanks,
    Nick

    Hi Larry & Strike First,
                      Thank you for your responses. I understand that this is an unusual situation. Basically I've recently taken over the IT support for this client. The client has just had a new phone system installed
    & are asking if they can speak to each office internally, which can easily be done once I setup the VPN.
    However I noticed whilst looking at this further that the Server names are the same, hence my question?
    Am I right in saying that providing the workstations  have a trust relationship with their own domain controllers through their individual domains on separate subnets, that hopefully there shouldn't be any DNS issues between the two domains and Servers?
    I could build a new VM if you feel it would be better practice to do so?
    Many thanks for your assistance,
    Nick

  • Two virtual disks with same name - how to safely delete one of them

    I mistakenly created a disk in a repository that uses the same friendly name as an existing disk that is in use by a virtual machine.
    Can I safely remove the second disk with out OVM trying to delete the original disk as well?
    Thanks

    Yes, you will be safe, bacause OVM uses the disk ID to identify the disk.
    You can also use the little triangle just to the left of the virtual disk name. It will open a message saying if disk is in use by a Virtual machine.
    Also, the GUI will not let you delete a disk which is in use.
    If you want another way, you can "edit" the disk in the OVMM GUI, read its ID, cancel the edit, and go delete it from a root command shell on the VM server.
    br.

  • Two folder locations with same name

    I have Two "Local Disk (D:)" in the folders section of lightroom.  I have no idea how it got this way. When I expand each "Local Disk (D:)", there are unique subdirectories.  I would like to have everything under "Local Disk (D:)", how do I merge the two?  When I try to grab a subfolder and move it to the first "Local Disk (D:)", it tells me that the subfolder already exists.  See screenshot..

    This happens to me some times too. I'm on a Mac and my photos are on a Drobo S connected via FireWire.
    It seems that Lightroom doesn't like the Drobo as I frequently have problems locating it, having to re-link the catalogue, sometimes resulting with the problem above.
    Now I re-installed the OS the see whether that solves anything. But overall I'm finding Lightroom 3 to be a bit problematic compared to LR1 and 2, at least on a Mac.

  • How to separate two contact with same name

    Hi, anyone knows how to separate two contacts with same name in Contacts?  Actually they are two persons from two gmail contacts with same name but different contact numbers, different emails....etc, but Contacts assume they are same person and merge them as one!

    FG,
    In Lion, you have the File > Duplicate option. You will then have two copies of your document open, and the one on top will have the temporary filename "OriginalFileName copy", and your next responsibility is to File > Save (or Command-S) and rename the duplicate. At this point, you edit the copy's name, to perhaps ...copy 1, or whatever you wish. The document you had open when you initiated the File > Duplicate will still be there on your screen, waiting for you to Close it or continue editing.
    Jerry

  • Can i have xml elements with same name but one is having attrbt..?

    Hi all,
    I am suppose to take input from one system into BPEL.That system is auto gererating xml file. But that file is strange. It has two xml element with
    same name but with completely different sequence. First one is having two comlexTypes while second is having 5 simple types.
    Now the difference is First element is having attribute while second is not.
    So is that file is correct.?
    thanks a lot.
    /mishit

    can you post the file? or load the file into JDeveloper and check the syntax or use XMLSpy for validation of the XML.

  • Batch Rename Multiple files with different names

    Hi,
    Is there any way to batch rename multiple files with individual names? I.e
    IMG_123 changed to  RSP45AS
    IMG_124 changed to MOL157A
    IMG_125 changed to AGKH135
    IMG_126 changed to MNOLH13
    IMG_127 changed to ASFBLUG
    Etc.
    Are they any programs or scripts or plug ins that would do that job?
    Thanks

    HI there Onemorewave,
    It looks like there is a batch remname feature included in OS X 10.10 Yosimte if you are planing on updating. 
    Rename files, folders, and disks - Mac Help
    Rename multiple items
    Select the items, then Control-click one of them.
    In the shortcut menu, select Rename Items.
    In the pop-up menu below Rename Folder Items, choose to replace text in the names, add text to the names, or change the name format.
    Replace text: Enter the text you want to remove in the Find field, then enter the text you want to add in the “Replace with” field.
    Add text: Enter the text to you want to add in the field, then choose to add the text before or after the current name.
    Format: Choose a name format for the files, then choose to put the index, counter, or date before or after the name. Enter a name in the Custom Format field, then enter the number you want to start with.
    Click Rename.
    Note: To batch rename, you would want to choose the "Format" option.
    -Griff W

  • Merging Log Files with same name

    Hello,
    I have log files with same name 00000000.jdb (because created at different machines). I would like to merge data stored in these two files.
    I tried below approaches which do not work:
    1. rename one of the files -> doesn't work as file header has file name info which doesn't match with renamed value
    2. db dump/load -> dump and load works without error. (i have to dump Entity related Database and Format related Database -- from -l option) However when i try to read the file, it gives error.
    Exception in thread "main" com.sleepycat.je.EnvironmentFailureException: (JE 5.0.103) Catalog could not be refreshed, may indicate corruption, errorFormatId=52 nFormats=51, . UNEXPECTED_EXCEPTION: Unexpected internal Exception, may have side effects.
    I am using EntityStore and thus Annotated Entities.
    Does any one has any insights?
    Thanks.

    Yuvaraj,
    As you discovered, it is not possible to use .jdb files from one environment in a different environment.  The .jdb files use an internal format with relationships between files that form the Btree.
    I'm glad to hear you were able to use DbDump and DbLoad successfully.
    --mark

Maybe you are looking for

  • Unable to capture in payment run

    Hi gurus, I have a credit note that won't capture in the payment run, f110. I have an invoice that should have written off that credit note but it didn't set it off. Now I'm wondering why the payment run won't pick the credit note? And won't make any

  • Infinite blue screen flicker when Macbook plugs into DVI monitor

    I have a black Macbook Core 2 Duo 2.2 ghz connected to an HP w2207 monitor through a DVI cable using the Apple-supplied DVI adapter. Often, when I plug the HP monitor into my macbook, the HP monitor will flicker a light blue color and be unable to pu

  • TDS posting during invoice & payment

    Dear Experts, i have assigned withholding tax code for payment and invoice in vendor master, Scenario:1 i have posted an invoice and tds has been calculated and posted, i have made the payment against that invoice again tds has been deducted, in this

  • Differences between 8.1.7.2 and 8.1.7.4

    Hi, I am running an insert (select * from) query to populate a temp tablespace, which on one database(8.1.7.4), takes 10 mins, and on another (8.1.7.2) takes over an hour! Are there any slight differences between the versions which may be giving thes

  • Wireless Messaging From Servlet

    Can I send wireless messages from a servle using Wireless Messaging API ??? I have a little test (taken from http://jan.netcomp.monash.edu.au/internetdevices/wireless/wma.html). There's a client that send messages, and a server that listens for incom