How to Make the File Extension Go Away in Captions

Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / How to Make the File Extension Go Away in Captions

Viewing 9 reply threads
  • Author
    Posts
    • #103142

      I need to customize static captions – remove the file extension.
      When giving the place command, I need not just come with the name without the extension. Example: foto.psd – I need to import a name without the extension: .psd.

    • #103144
      David Blatner
      Keymaster
    • #103145

      Thank you David Blatner for the response however;
      I used grep in this style code: \ .psd \ w + $
      But you’re removing the extension, what am I doing wrong?

    • #103150
      David Blatner
      Keymaster

      if the file is called foo.psd then you can just search (in the Find/Change dialog box, GREP tab) for \.psd and then leave the Change To field blank. That should delete it.

      (If you add the \w, then you are saying there must be another letter after the .psd )

      • #103151

        ok, so what would be the correct code for me to just remove .psd automatically. Because there are many files that I need to import and use their subtitles.

    • #103204
      Peter Kahrel
      Participant

      Rafael — Read David’s post carefully. Look for \.psd — you have a space before ‘psd’ so you won’t find any .psd extensions.

      P.

      • #103205

        I’m doing something wrong but I do not know what.
        This is the code I put in a new paragraph style – Grep Style:
        \. psd \ w + $
        But the file extension does not disappear when I import an image.

    • #103206
      Peter Kahrel
      Participant

      Ok, third time lucky we all hope. Use \.psd and don’t add anything. Not \ w, not anything at all. Nothing.

    • #103207

      Unfortunately I could not. But I thank everyone for their attention.

    • #103256
      Colin Flashman
      Participant

      It sounds like LIVE captions are being used rather than STATIC captions. Make sure the captions are the static variety of caption.

      In Dave’s original post, note that he also says “see the comments also”. In the original article, there is a comment from me (the second comment in the comments thread) pointing to an Adobe Bridge script that adds the filename to the Description field, minus its file extension. Perhaps have a look at that as this will allow LIVE captions without the suffix.

    • #103264
      David Blatner
      Keymaster

      Rafael, I understand you are still having problems with this. If you need to use Find/Change, you can do it like this:

      Or, if you want to use a grep style inside a paragraph style, you must first create a character style (in the Character Styles panel) that will make the text “disappear” (I suggest 0.1 pt text and set the color to None). Then you have to make a paragraph style and apply it to the caption text. Inside the paragraph style, you make a grep style like this:

    • #111242

      Hi David.

      I’ve done exactly as you explained above for live text. No joy.

      Character style set to 0.1 pt text and colour to none.
      Paragraph style GREP, apply style (as above), To Text: \.jpg (mine are jpegs)

      Does bugger all. Is there something missing? An extra step I’ve missed?

      Indesign 13.0

Viewing 9 reply threads
  • You must be logged in to reply to this topic.
>