So I tried testing this command with a bunch of Jpeg extended files which are actually WebP files. Here is the example command:
exiftool -ext jpeg "-fileName<%f.$fileTypeExtension" test.jpeg
which gave me the error:
Warning: [minor] Improper EXIF header - test.jpeg
Warning: No writable tags set from test.jpeg
Warning: Invalid tag name '%f.'. Use '=' not '<' to assign a tag value - test.jpeg
I then re-ran the command with "=" instead of "<":
exiftool -ext jpeg "-fileName=%f.$fileTypeExtension" test.jpeg
which changed the naming from "test.jpeg" to "test." without an extension. Is this expected?
Your command is correct by using
<. It includes a tag to copy
FileTypeExtension.
Your command works correctly here.
C:\>exiftool -G1 -a -s -filetype Y:\!temp\aaaa\001.jpeg
[File] FileType : WEBP
C:\>exiftool -ext jpeg "-fileName<%f.$fileTypeExtension" Y:\!temp\aaaa\
1 directories scanned
1 image files updated
C:\>exiftool -G1 -a -s -filename Y:\!temp\aaaa
======== Y:/!temp/aaaa/001.webp
[System] FileName : 001.webp
1 directories scanned
1 image files readI suspect you're either using PowerShell instead of CMD or using a .bat file. If the former, make sure you look at the highlighting. Make sure it is all the same color in each argument. Notice how
$CreateDate has a different color in this example.

In this case, you would have to swap double/single quotes.
If in a .bat file, then it is FAQ #27 (https://exiftool.org/faq.html#Q27).
Thank you for the response StarGeek! Yes the issue was with the quotes, using single quotes made the command execute properly.