Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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. get-blog.com/?p=22 –  Frank Thomas Apr 17 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 at 3:12

1 Answer 1

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

 
discard

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.