I have "allow multiple instances" disabled so that all files open in the same instance. When I run the following command (to open all .php files in the current tree), it issues very quickly many "textpad file.php" calls.
FOR /F "tokens=*" %G IN ('DIR /B /S *.php') DO textpad "%G"
If Textpad is already running, they will all open in the same instance. If it is not already running, then it will start multiple instances. This appears to be a problem in the startup code - there is no mutex or similar strategy used to ensure that only a single instance is being started.
Regards,
Brodie
disallow multiple instances still allows multiple instances
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
This only works for a smaller number of files, as the length of the command line is limited - the original version has no limit.How about:
SET ALL=
FOR /F "tokens=*" %%G IN ('DIR /B /S *.php') DO SET ALL=!ALL! %%G
textpad %ALL%
make sure to use "setlocal enabledelayedexpansion"
Just an idea:
Use
textpad
sleep 1000
FOR /F "tokens=*" %G IN ('DIR /B /S *.php') DO textpad "%G"
Choose a time for sleep long enough for the textpad instance to start up.
(if your system does not have a sleep, you can easily find one with google - make sure to select an appropriate time - some sleep utilities use seconds, some milliseconds).