#1
|
||||
|
||||
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? |
Sponsored Links |
#2
|
|||
|
|||
Maybe this workaround can help you a bit ?! :
https://superuser.com/questions/1062...ter-batch-file Somewhere i read, batch programming is very basic,cant do multithreading as you want. Or im wrong?! |
#3
|
|||
|
|||
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 |
#4
|
||||
|
||||
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: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back! |
The Following 2 Users Say Thank You to Joe Forster/STA For This Useful Post: | ||
GaMEr_2077 (06-06-2021), shazzla (05-06-2021) |
#5
|
||||
|
||||
__________________
My projects : Masked Compression, lzma2(xz) on Freearc, Zstd compressor for windows My optimizations : packjpg.exe, zstd, lzham, precomp-dev-0.45. |
The Following User Says Thank You to panker1992 For This Useful Post: | ||
shazzla (07-06-2021) |
#6
|
||||
|
||||
Quote:
Thanks for the help, problem solved. |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[CIUv3] Custom Installer Ultimate v3 | KaktoR | Conversion Tutorials | 833 | 22-05-2022 12:07 |
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 |