Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i have over 500 (50MB) .tif files and i want to convert them to .png i have tried nconvert and find it working, but there is no multithreading, is there a simple way of doing it in a bash or batch script?

preferably windows but cygwin will work to

share|improve this question
you can write a powershell script, but multithreading is a non-trivial task. – Frank Thomas Apr 17 '14 at 3:00
in bash it is very easy to start a process on another thread, but much harder to track the state of the threads. if you are fine with that, you can just call nconvert and put an '&' on the end of the command. that will cause it to run in the background. the only issue is you don't get easy signals that its completed its task, so you can;t effectively limit the number of threads running at any one time. you might have to process them in blocks of 25 or somthing to prevent starting hundreds of threads that all fight with eachother for execution time. – Frank Thomas Apr 17 '14 at 3:12

You could use gnu-parallel which works under Cygwin. Here is an exhaustive list of examples on how to use it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.