Changing the File Extension

Post Reply
MikeNaylor
Posts: 90
Joined: 13 Nov 16 14:40
Location: Spain
Contact:

Changing the File Extension

Post by MikeNaylor » 14 Dec 17 14:12

When renaming files, is there a way to change the file extension to lowercase? For example changing Filename.DNG to Filename.dng. I can see an option to extract the Original File Extension and change that to lowercase, but I can't see a way to remove or change to file extension.
Apple iMac (Retina 5K, 27-inch, Late 2015), macOS High Sierra, Photo Supreme 4, Lightroom Classic.

DirkS
moderator
Posts: 5234
Joined: 25 May 08 14:28
Location: Essex, UK

Re: Changing the File Extension

Post by DirkS » 14 Dec 17 16:39

This works for me:
Switch to 'edit as text and enter

Code: Select all

%FileName.%FileExtension{lowercase=y}
You can also achieve this in the GUI editor, but above method is quicker
Problems searching the forum? Try Google Site Search by adding 'site:forum.idimager.com' to a standard Google search.

MikeNaylor
Posts: 90
Joined: 13 Nov 16 14:40
Location: Spain
Contact:

Re: Changing the File Extension

Post by MikeNaylor » 15 Dec 17 11:33

Thanks DirkS. You've encouraged me to learn a little about scripting.
Apple iMac (Retina 5K, 27-inch, Late 2015), macOS High Sierra, Photo Supreme 4, Lightroom Classic.

MikeNaylor
Posts: 90
Joined: 13 Nov 16 14:40
Location: Spain
Contact:

Re: Changing the File Extension

Post by MikeNaylor » 15 Dec 17 12:30

DirkS - Just tried your code, but it doesn't work as expected.

Example: L1000621.DNG changes to L1000621.dng.DNG

As I said, I cannot find a way to extract just the filename without the extension. I've tried all the Left, Mid and Right variants, but these can't be used when selecting multiple files with varying name lengths.

Anymore suggestions?
Apple iMac (Retina 5K, 27-inch, Late 2015), macOS High Sierra, Photo Supreme 4, Lightroom Classic.

sanphotgn
Posts: 428
Joined: 26 Aug 07 18:06

Re: Changing the File Extension

Post by sanphotgn » 15 Dec 17 14:28

DirkS' script works here on Windows. I selected multiple files for the test.

MikeNaylor - after you enter the script as text in the Macro Text window and click on OK to return to the Rename window, where you see a kind of graphical representation of the script / macro, do you see the original file name and the new file name near the top of Rename window? Note - you haven't applied the script / macro yet. Is the new file name L1000621.DNG or L1000621.dng.DNG?
Photo Supreme 3.3.0.2602 (64 bits) (Windows)

MikeNaylor
Posts: 90
Joined: 13 Nov 16 14:40
Location: Spain
Contact:

Re: Changing the File Extension

Post by MikeNaylor » 15 Dec 17 14:41

The new (suggested) file name is L1000621.dng.DNG. I'm beginning to think this yet another issue that is Mac specific. Its often the case with multi platform software. Windows always seems to get priority support.
Apple iMac (Retina 5K, 27-inch, Late 2015), macOS High Sierra, Photo Supreme 4, Lightroom Classic.

sanphotgn
Posts: 428
Joined: 26 Aug 07 18:06

Re: Changing the File Extension

Post by sanphotgn » 15 Dec 17 15:00

The graphical representations of the the script / macro in the Rename window on Windows:

Rename.PNG
Rename.PNG (26.28 KiB) Viewed 1024 times

Do you see the same, except for the double file extension in the new (suggested) file name?
Photo Supreme 3.3.0.2602 (64 bits) (Windows)

MikeNaylor
Posts: 90
Joined: 13 Nov 16 14:40
Location: Spain
Contact:

Re: Changing the File Extension

Post by MikeNaylor » 15 Dec 17 15:05

Thanks sanphotogn, but that's exactly what doesn't work on a Mac. Your example would appear as N2016F3107.nef.NEF.
Last edited by MikeNaylor on 17 Dec 17 10:02, edited 1 time in total.
Apple iMac (Retina 5K, 27-inch, Late 2015), macOS High Sierra, Photo Supreme 4, Lightroom Classic.

Hert
Posts: 21032
Joined: 13 Sep 03 7:24

Re: Changing the File Extension

Post by Hert » 15 Dec 17 20:08

MikeNaylor wrote:
15 Dec 17 14:41
The new (suggested) file name is L1000621.dng.DNG. I'm beginning to think this yet another issue that is Mac specific. Its often the case with multi platform software. Windows always seems to get priority support.
That's not true. PSU was built from the ground up for both platforms. And PSU uses an identical code base for both platforms...meaning they are exactly the same, feature-wise.
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

DirkS
moderator
Posts: 5234
Joined: 25 May 08 14:28
Location: Essex, UK

Re: Changing the File Extension

Post by DirkS » 15 Dec 17 20:40

I experimented some more and there may be a bug. (NB this is on Windows)

If I start in the GUI and select Filename it shows up as a single block in the GUI with the text %Filename.
Renaming preview shows name + extension.

If I then select 'edit as text it shows up as

Code: Select all

%FileName.%FileExtension
If I add '{lowercase=y}' to it and confirm the GUI shows 3 blocks: Filename, the dot and FileExtension.

My conclusion is that there's something wrong with the preset (or its handling)

EDIT: the preset is fine. Somehow PSu has a problem whe it processes the preset.
AFAICT 'edit as text' works fine
Problems searching the forum? Try Google Site Search by adding 'site:forum.idimager.com' to a standard Google search.

Post Reply