Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Thread Tools Display Modes
Old 05-06-2021, 07:34
Masquerade's Avatar
Masquerade Masquerade is offline
Registered User
Join Date: Jan 2020
Location: Monte d'Or
Posts: 776
Thanks: 175
Thanked 849 Times in 414 Posts
Masquerade is on a distinguished road
Multithreaded bat file

Hello everyone,

I have a bat file designed to carry out a task for all files in a folder via FOR command.

Currently, it only processes one file at once then moves onto the next file. For folders with, say, 200 items, this doesn't take long. However, it takes several hours to process large folders with several thousand items inside.

So, if I have 16 threads, is there any way to run the FOR task for 16 files at once all the way until all files are processed?
Reply With Quote
Sponsored Links
Old 05-06-2021, 10:59
shazzla shazzla is offline
Registered User
Join Date: Nov 2010
Location: Hunnia
Posts: 223
Thanks: 411
Thanked 86 Times in 63 Posts
shazzla is on a distinguished road
Maybe this workaround can help you a bit ?! :


Somewhere i read, batch programming is very basic,cant do multithreading as you want.
Or im wrong?!
Reply With Quote
Old 05-06-2021, 11:10
Prince4 Prince4 is offline
Registered User
Join Date: Mar 2015
Location: India->Delhi->Rohini
Posts: 120
Thanks: 108
Thanked 19 Times in 15 Posts
Prince4 is on a distinguished road
You can create a batch file for each folder and run them all at once. With "Call" or "Start" i guess.

Edit : What shazzla said.
Who's Got Time To Play Games? Huh??

Last edited by Prince4; 05-06-2021 at 11:11. Reason: What shazzla has linked is the same
Reply With Quote
Old 05-06-2021, 11:20
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
Join Date: Nov 2000
Location: Hungary
Posts: 9,719
Thanks: 10
Thanked 299 Times in 190 Posts
Joe Forster/STA is on a distinguished road
This is the Unix bg command. It moves processes to the background - hence the name -, disconnecting their output from the console.

A more useful utility would be one that can launch command lines in the background. Try the built-in "start" command of Windows, with the options "/b" and "/min" and process priority, although it's not much. I use something like this when I want to compress multiple EXE's in the same directory with UPX.

None of these can synchronize the subprocesses, that is, make sure that exactly N subprocesses run at the same time and when one of them finishes, only then does the next one start.
Joe Forster/STA
For more information, see the FileForums forum rules and the PC Games forum FAQ!
Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply!
Homepage: http://sta.c64.org, E-mail: sta[email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back!
Reply With Quote
The Following 2 Users Say Thank You to Joe Forster/STA For This Useful Post:
GaMEr_2077 (06-06-2021), shazzla (05-06-2021)
Old 07-06-2021, 04:54
panker1992's Avatar
panker1992 panker1992 is offline
Registered User
Join Date: Oct 2015
Location: Always Somewhere
Posts: 527
Thanks: 113
Thanked 753 Times in 294 Posts
panker1992 is on a distinguished road
i am using this for the past years and it works well

My projects : Masked Compression, lzma2(xz) on Freearc, Zstd compressor for windows
My optimizations : packjpg.exe, zstd, lzham, precomp-dev-0.45.
Reply With Quote
The Following 2 Users Say Thank You to panker1992 For This Useful Post:
Masquerade (30-05-2022), shazzla (07-06-2021)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[CIUv3] Custom Installer Ultimate v3 KaktoR Conversion Tutorials 844 10-07-2022 19:05
SuperREP (SREP) Full Info! yasitha Conversion Tutorials 26 08-01-2019 18:49
PMA Update failure....????????? dannyk DVD Backup Forum 1 05-01-2005 14:19
cd burner help snatchcrash CD/DVD-Writers 1 14-09-2002 04:32
HELP ME PLZ!!!! Dalvin DC Games 0 02-01-2001 22:15

All times are GMT -7. The time now is 11:12.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.
Copyright 2000-2020, FileForums @ https://fileforums.com