Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6091591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:20:44+00:00 2026-05-23T12:20:44+00:00

The question is pretty much what is asked in the title. I have a

  • 0

The question is pretty much what is asked in the title.

I have a lot of PNG files created by MapTiler. 24083 files to be exact. They are within many folders which are in many folders i.e. a tree of folders, duh. Thing is, it’s the biggest waste of time to manually PNGCrush all of those.

Does anyone have an algorithm to share for me please? One that could recursively crush all these PNGs?

I have a Windows PC and would love to have it rather in Java or PHP than another language (since I already know it well) But else something else might be fine.

Thanks!

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:20:45+00:00Added an answer on May 23, 2026 at 12:20 pm

    You don’t need anything special for this, just use the FOR command in the Windows Command Prompt.

    Use this line:

    FOR /R "yourdir" %f IN (*.png) DO pngcrush "%f" "%f.crushed.png"
    

    The "yourdir" is the root-directory where the input files are stored.

    The two %f‘s at the end:

    • The first one is the input filename
    • The second one is the output filename

    -ow option added in 1.7.22 to make the operation in-place:

    FOR /R "yourdir" %f IN (*.png) DO pngcrush -ow "%f"
    

    See this page for more information of FOR.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The question is pretty much in the title, but I will elaborate. I have
I have a question that has pretty much been asked here: asp.net mvc Html.ActionLink()
I am pretty much sure that this question have been asked and answered several
The title of the question pretty much states the problem. Is it possible?
The title pretty much asks the whole question - How can I clear ONLY
This is somewhat related to another question that I've asked that I've pretty much
So I know this question have been asked a lot , but I don't
The question pretty much says it all. Is there any way to have the
this is pretty much an updated version of question I've already asked. I am
Ok, so I think the title of this question pretty much sums it up.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.