Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PLEASE HELP! Need to open and save Targa files with different extension than .TGA

New Here ,
Jun 21, 2024 Jun 21, 2024

I utilize software that differentiates Targa files by the extension.

Files with .1 insteat of .TGA are front views, and files with .2 are side views, etc.

These are Targa 16bit files.

I need to be able to load .1 files in Photoshop, edit and save as an extension other than .TGA.

PLEASE HELP.

Greg P
TOPICS
Windows
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
New Here ,
Jun 21, 2024 Jun 21, 2024

The files are actually 32bit Targa.

Greg P
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 21, 2024 Jun 21, 2024

Working with non-standard file extensions will require you to jump through some hoops, particularly so in Windows.

 

You should be able to save valid TGA files from Photoshop by changing the extension from .tga to .1 etc.

 

The issue is opening such files in Photoshop for Windows.

 

I would suggest that you Batch Rename the images using Adobe Bridge:

 

2024-06-22_10-58-16.png

 

Regular Expression Find:

(^.+)(\.)(\d+)

 

Replace With:

$1.$3.tga

 

Where "test.1" or "test.2" etc. would be renamed to "test.1.tga" or "test.2.tga" which now has a valid file extension for opening into Photoshop on Windows, while preserving the original number designation for the view. 

 

After saving the files from Photoshop, you would need to remove the .tga to return to the non-standard naming.

 

Bridge makes it very difficult to Batch Rename without using a valid extension, I know that it can be done but it escapes me at this time. You could possibly use another bulk renaming utility to remove the .tga file extension. Last resort would be manually remove the .tga extension.

 

Another alternative would be a custom script.

 

I'm interested to see what others come up with!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 22, 2024 Jun 22, 2024

@Gregory381864901nnt â€“ Here are 2 Photoshop scripts.

 

Script 1 of 2: 

Renames a folder of custom extension files from "image.1", "image.2" etc. to "image.1.tga" "image.2.tga" etc.

 

/*
Script 1 of 2 - Rename TGA to Open in Photoshop.jsx
v1.0 - 22nd June 2024, Stephen Marsh
Renames a folder of custom extension files from "image.1", "image.2" etc. to "image.1.tga" "image.2.tga" etc.
https://community.adobe.com/t5/photoshop-ecosystem-discussions/please-help-need-to-open-and-save-targa-files-with-different-extension-than-tga/td-p/14695748
*/

#target photoshop

    (function () {

        var theInput = Folder.selectDialog("Please select the folder:"),
            theFiles = theInput.getFiles(/\.\d+$/i),
            theFile,
            theName;

        for (var i = 0; i < theFiles.length; i++) {
            theFile = theFiles[i];
            theName = theFile.name.replace(/(^.+)(\.)(\d+)/, '$1.$3.tga');
            theFile.rename(theName);
        }

        /*
        // Open the files
        var theFiles = theInput.getFiles(/\.tga$/i);
        for (var i = 0; i < theFiles.length; i++) {
            var openFiles = app.open(File(theFiles[i]));
        }
        */

    })();

 

 

Script 2 of 2: 

Renames a folder of files from "image.1.tga" "image.2.tga" etc. to "image.1" "image.2" removing the standard .tga extension
 
/*
Script 2 of 2 - Rename TGA to Open in Photoshop.jsx
v1.0 - 22nd June 2024, Stephen Marsh
Renames a folder of files from "image.1.tga" "image.2.tga" etc. to "image.1" "image.2" removing the standard .tga extension
https://community.adobe.com/t5/photoshop-ecosystem-discussions/please-help-need-to-open-and-save-targa-files-with-different-extension-than-tga/td-p/14695748
*/

#target photoshop

    (function () {

        var theInput = Folder.selectDialog("Please select the folder:"),
            theFiles = theInput.getFiles(/\.tga$/i),
            theFile,
            theName;

        for (var i = 0; i < theFiles.length; i++) {
            theFile = theFiles[i];
            theName = theFile.name.replace(/(^.+)(\.[^\.]+$)/, '$1');
            theFile.rename(theName);
        }

    })();

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 02, 2024 Jul 02, 2024

Thanks for the information but that will not work due to the software that loads the files is looking to assign each to a side. Front = .1 Side = .2 etc. The prefix is UPC so this is a systematic funtion of the software we use to create Planograms (if your familiar with that term). Another software product had a configuration setting ...see attached

Gregory381864901nnt_0-1719928406968.png

 

Greg P
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 02, 2024 Jul 02, 2024
quote

Thanks for the information but that will not work due to the software that loads the files is looking to assign each to a side. Front = .1 Side = .2 etc. The prefix is UPC so this is a systematic funtion of the software we use to create Planograms (if your familiar with that term). Another software product had a configuration setting ...see attached

Gregory381864901nnt_0-1719928406968.png

 


By @Gregory381864901nnt


Did you actually try the 2 scripts?

 

If so, please explain why this doesn't work as I tested them in Windows Photoshop and they worked for me.

 

I don't know if one can assign non-standard image extensions to Photoshop which is why I provided the 2 scripts.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 02, 2024 Jul 02, 2024

Renaming files is not a solution for our problem as we have tens of thousands of Targa images that are named with .1, .2, as extentions and need to keep that format. When tryin to open in Photoshop we have to open as and select targa. It is then clunky to save as Targa with our needed extentions. Does that help you understand the issue? Ideally Photoshop should act like (or better considering price) an old version of Paint Shop Pro.

Greg P
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 02, 2024 Jul 02, 2024
LATEST

No, it doesn't.

 

Script 1 makes the files compatible with Photoshop while retaining the original numbering.

 

Script 2 renames the files back to their original naming after you have finished with them.

 

Good luck.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines