Cleaning up .rptok files?

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
User avatar
Oryan77
Dragon
Posts: 452
Joined: Sun Feb 20, 2011 3:14 pm

Cleaning up .rptok files?

Post by Oryan77 »

I have thousands of .rptok token files saved. I realized that most of these have old png/jpg files stored in the file that are old versions of tokens, portraits, and handouts. Many of these handouts are over 1mb which causes lots of these tokens to be close to 4mb in size.

Is there any easy (batch) way to delete image files that are in the .rptok file but are not selected in the token config as a "Layout", "Portrait", or "Handout" image?

I thought about changing the extension to .zip and manually deleting them, but you can't view a thumbnail image in a zip file. So the only way to figure out which files need to be deleted is to unzip the file, view the images, then go back into the zip file to manually delete those files. Is there an easier way to do this?

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Cleaning up .rptok files?

Post by aliasmask »

The easiest way is to take a couple of years of a programming language. Then the program could extract the xml to reference which image go where then delete the image based on size and location, then rezip the file.

But, if you drag all the images in to a campaign, you can have the macro code remove all the portrait and handouts, but you would need to manually resave all the tokens.

Post Reply

Return to “MapTool”