💾 Archived View for spam.works › mirrors › textfiles › programming › bat&conf.txt captured on 2023-06-16 at 20:08:42.
-=-=-=-=-=-=-
??????????????????????????????????????????????????????????????????????????????? Always start a program with a batch file containing [exit] as the first line. This is important if you! Let's say you already have shelled to dos from windows, dmp or another program. Running two big shells on top of eachother really fuck up your memory, and usually requires a reboot. Replace win.exe with win.bat and move win.com to winfile.com, and dmp.exe with play.bat and dmpfile.exe, just as an example.... | The bat files is to contain lines: 1 - exit 2-[program].[extension] ------------------------------------------------------------------------------- If you have 4dos, you can create aliases that replace the programs. Like: win=exit^win , etc....... ??????????????????????????????????????????????????????????????????????????????? Your path statement should NOT exceed 127 bytes. Remember that "path=" is a part of that environment string. ??????????????????????????????????????????????????????????????????????????????? If you ever need to turn a variable to UPPER CASE, save the path, set the path=[the variable], which will make it uppercase, set the original variable=[path], and restore the path... This might look like this: set oldpath=%path% set path=%a% set %a=%path% set path=oldpath This requires a lot of environment free, depending on you system-configuration. Suggestions to improvements: Use disk instead of environment to store temporary data. ??????????????????????????????????????????????????????????????????????????????? A very simple trick to expand the current path, is to set the path like this: set path=%path%;[the new directory you want temporarily in your path] Don't say you wasn't warned! VERY simple! ??????????????????????????????????????????????????????????????????????????????? if you like to have a lot of REM statements in your batch files, use this instead: When you normally- rem blahblahblahblablahblahblah rem blahblahblahblablahblahblah rem blahblahblahblablahblahblah rem blahblahblahblablahblahblah replace it with, goto a rem blahblah........ :a Which is faster, but not really noticeable on todays fast computers Dos really don't know that it's handling a REM line until it has processed and read the whole line! ??????????????????????????????????????????????????????????????????????????????? To prevent programs from messing up your autoexec.bat, as a first and only line in autoexec.bat, start a new batch file, called, for example, autosub.bat. This file would contain your originally autoexec.bat, and this way, you can select what lines you want to include. You might also try to set the read only attribute of the config.sys and autoexec.bat files. Not so good solution, but......? ------------------------------------------------------------------------------- With 4dos you would start the autosub.bat with a CALL autosub.bat. With command.com, i dunno, try c:\autosub.bat as a first line... ??????????????????????????????????????????????????????????????????????????????? again, a tip for slow computer, or really, slow text subsystems: In the beginning of your config.sys, put a: ctty nul which sends all output to the NUL: device and then in the end: ctty con which restores input from the kbd.... Remember that you can't really press ctrl-break during process since you haven't restored the keyb-control, and a ctrl+c will stop processing and deny any further processing... The NUL device is an empty device that points to nothing. This might be useful if a program refuses to let you NOT save a file. Type NUL: or NUL as filename, and you will never see the file again! ??????????????????????????????????????????????????????????????????????????????? There is an undocumented config.sys feature called "Comment". Use it like this: Comment=[text] Dos only captures the first to letters of the text, and COMMENT is not case-sensitive. After comment, dos ignores all lines that begins with the same two letters as the first two letters of [text] was. Let's say you don't want any drivers installed, you specify: Comment=De ,which in turn makes dos NOT install any DEvices. ??????????????????????????????????????????????????????????????????????????????? I found two other undocumented config.sys features. One of which I know the meaning of. (See it for yourself, just list io.sys.) The features is: INSTALLHIGH MULTITRACK Installhigh is like devicehigh and loadhigh, but it INSTALLs high, just like dvh and lh. (Installing is for starting exe/com files from config.sys that are not really needed for installing here...) Multitrack... I dunno what this is, but I will investigate it further, and get back to you. If you know what this is, please contact me. ??????????????????????????????????????????????????????????????????????????????? Sometimes the order of fcbs, stacks, files, etc... DO COUNT!!! You might run into some RARE problems when the order of these "names" is in a certain order. It occoured to me that it was this way, when I suddenly had problems when the machine locked up whenever I used the internal "copy" !!! I had to rem out every line in autoexec.bat (really autosub.bat), and then every line in config.sys, until I suddenly found out that the order DO COUNT! Generally, I put it in this order (at the absolute beginning of config.sys): files buffers fcbs lastdrive stacks That works ok for me. ??????????????????????????????????????????????????????????????????????????????? Set verify=on when using non-standard devices in dos. This helps you PKUNZIP (and arj, lha...) and copy from, for example, 84track 21sec/track disks. You might think that this isn't a problem, and it is very rare indeed... ,But it happens, and the extra time dos uses with disk sector verifying is really worth it. ??????????????????????????????????????????????????????????????????????????????? Set break=on to be able to break more often. Everyone needs a break sometimes....... =*) The extra speed gained in dos by setting break=off, isn't THAT much, and when you set break=on, you can break unwanted processes faster, which makes dos sessions go faster. Have you ever COPYed files to the wrong destination? When break=on, dos checks for ctrl+c even when handling disk operations, so you can break relatively fast, and recover faster... ??????????????????????????????????????????????????????????????????????????????? Do you need to know if to files is different? As far as I know, fc or comp don't leave errorlevels, BUT there is a solution! Try this: attrib -rsh .\nomatch del .\nomatch fc %file1% %file2% > .\nomatch if exist .\nomatch echo There was a difference! Nice, eh? Not? =*) ??????????????????????????????????????????????????????????????????????????????? Want to copy disks faster? You COULD check which clusters were occupied, etc.. BUT if you aren't so keen on writing anything else than bat-files, just copy ALL files on you floppy (/S /H) to a temporary directory on your hd, copy labels (with LC.btm). Then MOVE them out again to disk, and you are done! No empty clusters copyed! ???????????????????????????????????????????????????????????????????????????????