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

how to remove old images from figures folder

New Here ,
May 26, 2015 May 26, 2015

Copy link to clipboard

Copied

Hi All -

I am working on a large unstructured book in FM11. There are tons of figures (screen shots) residing in the Figure folder(s) that are no longer applicable and just taking up space.

Is there a script or a way to weed out and gong unused screen shots?

Any help would be appreciated.

Views

708

Translate

Translate

Report

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
Advisor ,
May 26, 2015 May 26, 2015

Copy link to clipboard

Copied

How about …

  1. generate list of graphics that are used (LOR, set up for Imported graphics)

    I've just checked, and the <$referencename> building-block helpfully pulls in the path as well as the filename

  2. copy existing graphics folder to temporary folder
  3. delete all graphics in original folder (but not the folder)
  4. use LOR to write batch-file that copies (or moves; up to you) all referenced graphics from the temporary folder to the real folder
  5. archive the temporary folder just in case :-}

There may well be other ways, including scripts …

Votes

Translate

Translate

Report

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 ,
May 27, 2015 May 27, 2015

Copy link to clipboard

Copied

Appreciate your reply.

Unfortunately, I've never written a batch file or used a building-block to reveal filename paths.

Votes

Translate

Translate

Report

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
Advisor ,
May 27, 2015 May 27, 2015

Copy link to clipboard

Copied

open .book

  1. Add > List of > References
  2. in the Set-up dialog for the list, move "Imported graphics" into the Include references list
  3. update the book to generate the initial List of references (LOR)

So far so good … now adjust the LOR if necessary

  1. open the LOR
  2. select View > Reference pages
  3. page down till you see the page that starts [something like] openXmlElementId <$relfilename>:<$UniqueXmlElementId> <$RelativeXmlElementId>
  4. adjust the line that starts <$referencename> as required

    This is the line that pulls in the information you're after; mine reads <$referencename>{tab}<$filename>. The elements between angle brackets are the building blocks, a concept you'll also come across when defining cross-references and autonumbering.

  5. select View > Body pages, save your changes, click on the LOR entry in the book (to set focus on the book) and click Update book to regenerate the LOR

En passant, I can only envy all of you out there who are allowed to install scripts like responsible adults …

Votes

Translate

Translate

Report

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 ,
May 28, 2015 May 28, 2015

Copy link to clipboard

Copied

Thanks so much FieryPantone! I have followed your latest instructions and now have an 18 page LOR.fm doc with tons of single line entries that include figure filename paths, dpi info, and page numbers. (Example: Figures/Chapter 06/Fig 06_20a.png @ 175 dpi Displaying_Data_Graphic_Views.fm 144) Please let me know what I need to do next.

Votes

Translate

Translate

Report

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
Advisor ,
Jun 01, 2015 Jun 01, 2015

Copy link to clipboard

Copied

  1. copy the content of the LOR into a text editor
  2. get rid of everything from {space}@ to the end of the line
  3. delete the path info
    You should now have a text file containing a whole slew of file-names, for example Fig 06_20a.png
  4. massage this list to create a batch file with commands like copy "Fig 06_20a.png" ..\ to copy all the files in your list into the required directory

observations:

  • see how much easier a script can make things <rofl>
  • I'm old enough never to use spaces in file-names
  • quite a few authorities suggest that sequential/per chapter numbering in file-names for graphics will come back and bite you sooner or later when you need to reuse or move a graphic

Votes

Translate

Translate

Report

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 01, 2015 Jun 01, 2015

Copy link to clipboard

Copied

re: see how much easier a script can make things <rofl>

I wrote a similar one for FM7 (on Unix) that massaged the MIFs. It took several iterations to catch a critical mass of oopsies, such as Text Insets having unique syntax vs. images. As I recall, it did handle spaces in file paths (which I agree are poor stewardship), and threw warnings on files/paths containing commas (which are a problem for some version of Windows FM). It would not have handled a book of books, nor insets with insets and other creative structuring.

Votes

Translate

Translate

Report

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 ,
Jun 09, 2015 Jun 09, 2015

Copy link to clipboard

Copied

Appreciate your time on this FieryPantone, but you lost me on create a batch file.

My hopes and dreams of weeding out unused figures seems to be more trouble than it's worth.


Votes

Translate

Translate

Report

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
Advisor ,
Jun 09, 2015 Jun 09, 2015

Copy link to clipboard

Copied

Don't lose heart … tidying up your graphics directory is certainly worth the effort.

Batch file in a nutshell: when you open a DOS box/terminal, you can issue a single command – for example, "move {thisFile} to {thisDirectory}". A simple batch file holds a whole stack of these commands, and saves you a lot of time and typing. Start from Batch file - Wikipedia, the free encyclopedia or find a colleague who is happy working with the command line*.

* command line – just another way of referring to DOS box/console/terminal

Votes

Translate

Translate

Report

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 10, 2015 Jun 10, 2015

Copy link to clipboard

Copied

re: My hopes and dreams of weeding out unused figures seems to be more trouble than it's worth.

Scroll down. Arnis provided the pointer to the freebie script. Get it. Then follow the steps I outlined above it.

Votes

Translate

Translate

Report

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 ,
May 27, 2015 May 27, 2015

Copy link to clipboard

Copied

re: There may well be other ways, including scripts …

  1. Install the free Archive extension for FM11 & later.
  2. Run it to create a new images directory containing just the used images.
  3. Delete everything in the old Figures directory.
  4. Copy back the used images from the dir created by archive.
  5. Discard the archived copy of the document.

I've not used this feature, so don't know what exact dir name is created.

Votes

Translate

Translate

Report

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 ,
May 27, 2015 May 27, 2015

Copy link to clipboard

Copied

Thanks so much for your reply Bob, however I cannot locate the archive extension download you mentioned.

Votes

Translate

Translate

Report

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
LEGEND ,
May 27, 2015 May 27, 2015

Copy link to clipboard

Copied

The book archiving extendscript and background info can be found here: Create a Book Packager using Extendscript « TechComm Central by Adobe

The direct link to the script is: http://blogs.adobe.com/techcomm/files/2011/07/Archive-v2.zip

Votes

Translate

Translate

Report

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
Contributor ,
Jun 11, 2015 Jun 11, 2015

Copy link to clipboard

Copied

LATEST

Whatever else you do, keep a copy of the graphics that you believe you no longer need because they are not referenced by your documents. You might later discover that they are used in your documents, but have been imported as a copy, and so do not appear in a list of references. Whereas you could try copying them back out of the FrameMaker document, it's better to have the original source.

Votes

Translate

Translate

Report

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