Create account / Log in

Removing Unused Pictures

Topics related to Vassal game modules.

Moderators: Tim M, uckelman

Removing Unused Pictures

Postby pawnpusher » March 24th, 2020, 1:43 am

I've fallen into the trap of naming each version of a map or component with a new name, and I have several unused pictures in my module some of which are rather large.

How does one remove them?

Or should I consider starting over with the module from scratch?

Thanks.
pawnpusher
 
Posts: 7
Joined: October 5th, 2013, 4:04 am

Re: Removing Unused Pictures

Postby uckelman » March 24th, 2020, 11:02 am

Thus spake pawnpusher:
> I've fallen into the trap of naming each version of a map or component
> with a new name, and I have several unused pictures in my module some of
> which are rather large.
>
> How does one remove them?

Modules are ZIP archives. Unzip the module, remove the images you don't
want, rezip the module.

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8186
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Removing Unused Pictures

Postby ChuckS » March 24th, 2020, 1:11 pm

Backup the module first in case you wreck it in the cleanup process, it's best to unzip to a file into a directory then go clean out the items you don't need. Then create a new compressed folder and copy the remaining data back into that compressed folder, then rename that folder back to the original game module name.

If you try and delete inside the zip file it will take forever! Just remember backup backup backup.
ChuckS
 
Posts: 90
Joined: August 16th, 2016, 4:37 pm

Re: Removing Unused Pictures

Postby JoelCFC25 » March 24th, 2020, 1:26 pm

ChuckS wrote:If you try and delete inside the zip file it will take forever!

This needn't be the case. If you use the compression tools built into Windows Explorer, this is true, because those tools are hideously broken. If you use a good 3rd party tool like 7zip, opening a ZIP archive and deleting files within it is a nearly instantaneous process as it should be--no complete unzip/rezip needed.
JoelCFC25
 
Posts: 629
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Removing Unused Pictures

Postby pawnpusher » March 25th, 2020, 3:22 am

Thanks all!
pawnpusher
 
Posts: 7
Joined: October 5th, 2013, 4:04 am

Re: Removing Unused Pictures

Postby shilinski » March 25th, 2020, 8:25 am

I second using a third-party zip tool. I use 7zip all the time because I don't have to unzip the files, and I can do mass image replacement (just make sure the files have the same name) without having to use the editor.

You have to be careful too when unzipping and rezipping because you can inadvertently pull in files (hidden files especially) that you don't want. I've occasionally looked at mods I haven't worked on, and sometime I've seen tons of obvious junk inside. Once I saw another entire copy of the vmod inside the vmod! I wonder if that vmod itself contained another vmod, and then that one too. Sort of a Russian dolls sort of thing. I never checked.
shilinski
 
Posts: 98
Joined: December 22nd, 2007, 8:46 am
Location: Laurel, Maryland

Re: Removing Unused Pictures

Postby pawnpusher » March 29th, 2020, 3:41 pm

I downloaded and used the 7-zip app as suggested above. It worked great!

Thanks again!
pawnpusher
 
Posts: 7
Joined: October 5th, 2013, 4:04 am


Return to Module General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron