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

  • SEARCH
  • Home
  • 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 6994771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:56:04+00:00 2026-05-27T19:56:04+00:00

I have a folder of images over 4MB – let’s call this folder dsc_big/

  • 0

I have a folder of images over 4MB – let’s call this folder dsc_big/. I’d like to use convert -define jpeg:extent=2MB to convert them to under 2MB and copy dsc_big/* to a folder dsc_small/ that already exists.

I tried convert dsc_big/* -define jpeg:extent=2MB dsc_small/ but that produces images called -0, -1, and so on.

What do I do?

  • 1 1 Answer
  • 0 Views
  • 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-27T19:56:05+00:00Added an answer on May 27, 2026 at 7:56 pm

    convert is designed to handle a single input file as far as I can tell, although I have to admit I don’t understand the output you’re getting. mogrify is better suited for batch processing in the following style:

    mogrify -path ../dsc_small -define jpeg:extent=2MB dsc_big/*
    

    But honestly I consider it dangerous for general usage (it’ll overwrite the original images if you forget that -path) so I always use convert coupled with a for loop for this:

    for file in dsc_big/*; do convert $file -define jpeg:extent=2MB dsc_small/`basename $file`; done
    

    The basename call isn’t necessary if you’re processing files in the current directory.

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

Sidebar

Related Questions

I have a folder containing over 200 raw images, i want to convert all
I have a folder C:\Images which has a some images. This folder is not
I have an images folder with a png in it. I would like to
I have a set of images in a folder call 'uploads/', all the files
I have some websites that use ImageMagick to convert images and place them in
I have a webcam directly over a chicken nest. This camera takes images and
I have this drupal slideshow which pulls images from a folder sequentially by image
I have a php/mysql website with over 200,000 images in single folder (linux server)
I'm having trouble with my Apache Web Server. I have a folder (htdocs\images) where
I am working on an application where I have an images folder relative to

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.