Batch Rename of Canon Raw files (CR2)

Ask for help and post your question on how to use XnView Classic.

Moderators: helmut, XnTriq, xnview

eagle79
Posts: 11
Joined: Mon Feb 05, 2007 12:19 am

Batch Rename of Canon Raw files (CR2)

Post by eagle79 »

Is batch rename of Canon raw files supported in 1.90? I have been trying to do this, but receive the rather generic "Error renaming file" when attempting to rename the files. If I don't have any CR2 files selected when this happens, everything works fine.

Is this supported? Am I doing something wrong?

The name template I'm trying right now is "<Date> ###" and the files are Canon Digital Rebel XT RAW files (*.CR2)

By the way, I must say, I've been using this product for about a year now, and I absolutely love it.
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Re: CR2 Batch Rename in 1.90

Post by marsh »

It should work unless there is another file with same name already in the directory you are using (which causes an error ).
eagle79
Posts: 11
Joined: Mon Feb 05, 2007 12:19 am

Post by eagle79 »

Nope. I double checked and the only other file in the directory (other than the images I'm trying to rename) is a zip file named stuff.zip. To be sure I removed it to and tried again. I'm selecting all the files using CTRL+A and then choosing Tools->Batch Rename.

Incidentally, I had the pattern template wrong. It is "<Date> ###". The dialog and preview of new filenames is correct. It only fails when I finally hit "Rename"

Is there any log I can check for more information about the error?

UPDATE:
*scratches head* Maybe I didn't get the template wrong... When I typed it this time, it still went back to what you see... I think the bulletin board is treating it as a tag... inside the angle brackets it should say "Date Taken [Y-m-d]"
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Post by marsh »

Duplicate filenames in list can also make error. Using "_##" as a template in the [duplicate] button's dialog might help.
Last edited by marsh on Mon Feb 05, 2007 2:57 am, edited 3 times in total.
eagle79
Posts: 11
Joined: Mon Feb 05, 2007 12:19 am

Post by eagle79 »

Sorry... it wasn't posting right... see my update above...
eagle79
Posts: 11
Joined: Mon Feb 05, 2007 12:19 am

Post by eagle79 »

Okay, to simplify, I simply tried the template "#####". Same result.
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Post by marsh »

With extremely big image, it is possible to produce a rename error if an image is still being loaded in preview. I don't have cr2s to test (so disabling preview?). Your turn. :)
eagle79
Posts: 11
Joined: Mon Feb 05, 2007 12:19 am

Post by eagle79 »

Now I'm really confused...

I got it to work once, by choosing View->View As->List. Following that, it stopped working. Following that, I unchecked View->Preview Pane->Show. But it still won't work.

I think you may be on to something though. I've noticed I can't rename *.MOV files easily in XnView because they play as soon as you select them and XnView seems to be holding a file lock open on them. Could the same be happening here?
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Post by marsh »

Try lowering the size of images/thumbs previewed in Options>Browser>File List>Show in Preview & Show as Thumbnails columns- say to [5000]Kb. Anyone else?
eagle79
Posts: 11
Joined: Mon Feb 05, 2007 12:19 am

Post by eagle79 »

Nope. No go there, either.

Honestly, that wouldn't be much of an end-solution for me, anyway. My workflow includes renaming batches of photos based on their contents (filenames like 2007-02-02 Suzy 01, etc). It's one of the reasons I absolutely love XnView. It still works great with JPGs, but I'm trying to move to a camera raw-based workflow, and this wasn't working for me. I have no idea if the problem was present in prior versions, because I started using raw right after upgrading XnView.

Also, I had the cache turned on, so I had to clear it before I could figure out what the setting change did. After testing, I set the values back to their original values.
eagle79
Posts: 11
Joined: Mon Feb 05, 2007 12:19 am

Post by eagle79 »

A clue...

I just tried a file rename in good old windows explorer while XnView was open on the directory in question. It failed due to the file being "used by another person or program." This is true even if the file being renamed is not highlighted/selected in XnView. Moving out of the directory does not fix the problem. Closing XnView altogether does.

It's definitely a file locking issue. Is it possible XnView is forgetting to close the CR2 files after extracting their thumbnails?
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

eagle79 wrote:It's definitely a file locking issue. Is it possible XnView is forgetting to close the CR2 files after extracting their thumbnails?
But do you wait the preview is loaded????
If i have 'Full resolution' and rename before viewing the proview, i can reproduce...
Pierre.
eagle79
Posts: 11
Joined: Mon Feb 05, 2007 12:19 am

Post by eagle79 »

Everything is loaded. I've actually left it up on the same image and come back hours later. The same is still true. Note that the file rename test under explorer failed even when XnView was in another folder.

That said, I did some careful testing just now, and the locking problem seems to only appear after attempting a batch rename.

To be sure, here's what I did:
- closed everything
- opened explorer, renamed file (worked)
- opened XnView to the folder
- in explorer, renamed file (worked)
- in XnView, used regular rename to rename file (worked)
- in explorer, renamed file (worked)
- in XnView, selected file, waited on preview to load completely (plus a little extra time to be sure)
- in XnView, attempted batch rename on only the selected file (one file) (failed)
- in explorer attempted rename of that file (failed)
- in explorer attemtped rename of a different file in that directory (failed)
- chose a different folder in XnView
- in explorer attempted rename of both first and second file (both failed)
- closed XnView
- in explorer attempted rename of both first and second file (both worked)
User avatar
xnview
Author of XnView
Posts: 46255
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview »

eagle79 wrote:Everything is loaded. I've actually left it up on the same image and come back hours later. The same is still true. Note that the file rename test under explorer failed even when XnView was in another folder.

That said, I did some careful testing just now, and the locking problem seems to only appear after attempting a batch rename.
Could you send me your email by PM, i would like to send a test version...
Pierre.
eagle79
Posts: 11
Joined: Mon Feb 05, 2007 12:19 am

Post by eagle79 »

I don't know if you wanted me to reply here or in the email.

I tried the test version you sent. I got excited because to begin with it worked. Then I tried to rename again and got the error. I did a lot of playing and came up with the following...

If I rename a batch of files immediately after opening XnView it works so long as I'm using a simple template as discussed below. Immediately following that, if I want to do so again, I must close and reopen XnView before it will work again. This is only when using simple templates such as '#####'. If I try something like the template I'm trying to get to ('<Date Taken [Y-m-d]> ###'), it never works.
Post Reply