Move JPG and DNG Files

Discuss and share scripts and script files...
Post Reply
Nando
Posts: 9
Joined: 15 Jun 2014 17:52

Move JPG and DNG Files

Post by Nando »

Hello,

I want to search for the four digits of the selected image file?
There are JPG and DNG to the SD-card present.

I will select and move the files founded/shown in the listener.

Can someone help me?


Best regards,
Nando

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Move JPG and DNG Files

Post by highend »

Post such a (full) file name.

There are additional jpg / dng files in the same folder? sub folder? that have a different name but share the same 4 digits from the selected file?

For example: If the selected! filename looks like "IMG_1234.jpg" and you have another file in the same or a subfolder that is called "IMG_1234.dng" than you'd find both by using:

Code: Select all

    $pattern = regexmatches("<curitem>", "\d{4}");
    if ($pattern) {
        goto "?*$pattern.jpg;*$pattern.dng /rf";
    }
Instead of the goto command you could also use:
selfilter "?*$pattern.jpg;*$pattern.dng", "f";

Which would directly select those file (but it doesn't work for subfolders as long branch view isn't active)...

If the filename has a different name... The script needs changes^^
One of my scripts helped you out? Please donate via Paypal

Nando
Posts: 9
Joined: 15 Jun 2014 17:52

Re: Move JPG and DNG Files

Post by Nando »

Hello,
thank you for your post!

It is a directory 'DCIM' with pictures in subdirectories.

file example from the month July
DCIM / 139 ___ 07 / IMG_3370.JPG
DCIM / 101 ___ 01 / CRW_3370.DNG (raw always there)

Code: Select all

    $pattern = regexmatches("<curitem>", "\d{4}");
    if ($pattern) {
        goto "?*$pattern.jpg;*$pattern.dng /rf";
    }
With this code one JPG with his DNG is displayed.
All selected JPG with his DNG would be nice.

bye,
Nando

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Move JPG and DNG Files

Post by highend »

Sorry, I don't get what you want.

This is the file you've selected:
DCIM / 139 ___ 07 / IMG_3370.JPG

And now you want to find all other files with "*3370.jpg / *3370.dng", right?
So the problem is, the belonging files exist in different folders than the selected file?

In case that's a correct assumption you'd need to search the parent directory to get all of them.

Code: Select all

    $pattern = regexmatches("<curitem>", "\d{4}");
    if ($pattern) {
        $parent = regexreplace("<curpath>", "(^.*\\).*", "$1");
        goto "$parent?*$pattern.jpg;*$pattern.dng /rf";
    }
One of my scripts helped you out? Please donate via Paypal

FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

Re: Move JPG and DNG Files

Post by FluxTorpedoe »

Well, there's still room for improvement for Google translate... ;)

• So I'll make a wild guess based on my personal workflow with photos:
Maybe you first preview your photos in JPG (because it's fastest), and isolate several of them, either the "best of" you want to work with, or on the contrary the ones you want to delete.
Once you have finished your selection, you want this selection to be mirrored on your master photos (the DNG) so you can work with the raw files.

• If so, here's a way:
— Put XYplorer in dual pane {F10}
— In the first pane, open the folder that contains the JPG files
— In the second pane, open the foder that contains the DNG files
— In the first pane, select the JPG files you want

Then either:
a) Open the menu "Pane|Sync Select..." > Choose the entry #7 "Select Selected" and check the two boxes "On both panes" and "Ignore extensions" > Ok
   or
b) paste the following line into the Adress Bar, then press {Enter}
::sync("SelectSelected" , , 1, , 1);

---------------------------

As a side note, I may add that I don't use this RAW+JPG workflow anymore for a simple reason:
:arrow: I'm using XYplorer preview with picture codecs, it's much faster to make preselections directly on the RAW files!
(Except for 16bit TIF which are painfully slow, but Canon RAW shouldn't give you any problem.)

• So no need to bother:
— Shooting in RAW+JPG
— Converting to DNG (best to avoid this if you can)

• Much better to:
— Shoot in RAW
— Preview RAW files in XYplorer, deleting the unwanted, and marking (e.g. with label) the favorites/priority
— Import those RAW in your editor of choice

---------------------------

Hope this helps, 8)
Flux

Nando
Posts: 9
Joined: 15 Jun 2014 17:52

Re: Move JPG and DNG Files

Post by Nando »

Thanks for your help!

@highend
I would like to select more then 1 image (for example Focus bracketing).

Is it possible to select
DCIM/139 ___ 07/IMG_3370.JPG
DCIM/139 ___ 07/IMG_3371.JPG

and get also selected
DCIM/101 ___ 01/CRW_3370.DNG
DCIM/101 ___ 01/CRW_3371.DNG
?

I want to move the files to the archive of the month July.
DCIM/139 ___ 07/IMG_3370.JPG
DCIM/139 ___ 07/IMG_3371.JPG
DCIM/101 ___ 01/CRW_3370.DNG
DCIM/101 ___ 01/CRW_3371.DNG


@FluxTorpedoe
Well, there's still room for improvement for Google translate... ;)

• So I'll make a wild guess based on my personal workflow with photos:
Maybe you first preview your photos in JPG (because it's fastest), and isolate several of them, either the "best of" you want to work with, or on the contrary the ones you want to delete.
Once you have finished your selection, you want this selection to be mirrored on your master photos (the DNG) so you can work with the raw files.
That's true. :wink:

'Sync Select' is possible with different beginning (IMG_*, CRW_*)?
I think it does not work for me!?

What is your Codec? In my case it is very slow to show previews of DNG (have used Adobe DNG, Sagethumbs/ 1Image 1second for preview).

FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

Re: Move JPG and DNG Files

Post by FluxTorpedoe »

Hi'
Woops, I hurried a bit and didn't notice you had different prefixes.

• To answer your question literally, select your JPGs (even in Single Pane), then paste this into the Adress Bar and press {Enter}:

Code: Select all

::$items = regexmatches(get("SelectedItemsNames"), "\d{4}"); goto "<curpath>\..\?>$items";
This makes a regex search (?>) based on the pipe-separated list of items you've selected.

---------------------------

• Now, to get back to my Dual Pane workflow, in case you may need it too. If you have different prefixes, follow the procedure of my previous post, but use this code instead:

Code: Select all

::$items = regexmatches(get("SelectedItemsNames"), "\d{4}"); #802; selfilter $items;
It switches to the other pane (#802), then select the corresponding list of items you've selected in the first pane.

---------------------------

• And to answer you codec question:
I had used SageThumbs for a little while, but bought FastPictureViewer Codec Pack (10$), and —at least for me— it's worth every penny! Even for weird RAW formats not even recognized by Photoshop/Lightroom (like Sigma X3F) (with the exception of huge 16bit TIFs which are still slow as I mentioned — and of course, YMMV, I haven't tested every kind of RAW with it).
But this gives rather fast thumbnails, and above all, ultra-fast preview by middle-clicking on any photo. Plus it removes any incentive to use DNG (as I said, safer to avoid it if you can).

:arrow: I haven't found a single soft that can beat XYplorer+FPV speed for previewing pictures!

Nando
Posts: 9
Joined: 15 Jun 2014 17:52

Re: Move JPG and DNG Files

Post by Nando »

Thank you Flux!

I have create a Button with the Code for Single Pane.
It works as it should.

I will do some testing with FastPictureViewer.


thanks again,
Nando

Nando
Posts: 9
Joined: 15 Jun 2014 17:52

Re: Move JPG and DNG Files

Post by Nando »

Hello,
FastPictureViewer is too slow (directory with 20 DNG 10 seconds for preview). Explorer displays the preview instantly (Adobe DNGCodec 2 and Microsoft Camera Codec Pack installed).

XYplorer shows me no preview after uninstalling FastPictureViewer. How can I fix this?
Tested settings:
- Previewed format
- Show thumbnails for non-images
- Show thumbnails for RAW images

I want the DNG file integrated preview.


bye,
Nando

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Move JPG and DNG Files

Post by highend »

Try reinstalling Adobe DNGCodec 2 and Microsoft Camera Codec Pack
One of my scripts helped you out? Please donate via Paypal

Nando
Posts: 9
Joined: 15 Jun 2014 17:52

Re: Move JPG and DNG Files

Post by Nando »

I have reinstalled DNGCodec 2, Microsoft Camera Codec Pack and XYplorer, no success.
Also as a new user.

Nando
Posts: 9
Joined: 15 Jun 2014 17:52

Re: Move JPG and DNG Files

Post by Nando »

NEF is shown but slowly. :/

FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

Re: Move JPG and DNG Files

Post by FluxTorpedoe »

Hi'
Sorry for the delay, was offline. Hope you solved your missing preview problem.

Regarding DNG or NEF previewing speed, did you change FastPictureViewer settings? I've no issues here (on a low-end computer) with FPV setting "embedded JPG preview" ON for those files.
— 12MegaPixels NEF do not open instantly but in much less than 1 sec.
— DNG previews are small but open instantly, even a 68 MP panorama (whose preview is < 2MP).

Granted, without using the embedded preview, 4MP DNG are not instantaneous (though still much less than 1 sec), and the 50MP+ panoramas just don't work... ;)

Well, I hope you'll find a good balance between speed and quality!

Post Reply