Search found 117 matches
- 16 Jan 2021 07:08
- Forum: DOS Batch Forum
- Topic: Issue with executing a command in parallel
- Replies: 2
- Views: 185
Re: Issue with executing a command in parallel
Try Start /B to initialise the script in parellel and test delay length required to catch the existance of the output file An example Pair [you may need to adjust the delay method] Caller.bat @Echo OFF & CD %~dp0 & mode 1000 Del "newoutput.txt" 2> nul Start /B callee.bat Echo started Call :Delay 2> ...
- 14 Jan 2021 23:05
- Forum: DOS Batch Forum
- Topic: How to write REM Comments in a new file
- Replies: 4
- Views: 227
Re: How to write REM Comments in a new file
Or if you have multiple templates, you could use a findstr approach such as this: @echo off & CD "%~dp0" rem ID the line Call to writescript is made from to enable skipping of the call lines Delim rem Delim must be unique to each template and not include in the template. rem allows the line to be re...
- 08 Jan 2021 06:25
- Forum: DOS Batch Forum
- Topic: ERRORLEVEL and Where.exe program
- Replies: 2
- Views: 274
Re: ERRORLEVEL and Where.exe program
My preferred solution is to define the programs name to a variable like so:
And then to execute you can make it conditional on the variables definition.
Code: Select all
For /F "Delims=" %%G in (' where programname.ext 2^> Nul ')Do Set "%%~nG=%%G"
Code: Select all
If defined programname (
rem commands to execute
)
- 07 Jan 2021 19:50
- Forum: DOS Batch Forum
- Topic: Batch File to edit specific line of Text file
- Replies: 58
- Views: 4537
Re: Batch File to edit specific line of Text file
as a macro, no command would have been assigned to C. The original design was to allow a degree of reusabailty through providing a label name to return to if Repeat was selected using substring modification to replace lbl with the actual label name %menu:lbl=labelname% The macro acts in effect as a ...
- 07 Jan 2021 12:00
- Forum: DOS Batch Forum
- Topic: Batch File to edit specific line of Text file
- Replies: 58
- Views: 4537
Re: Batch File to edit specific line of Text file
I didn't know "^" closes parenthesis and "&&" is used to add multiple commands within a menu item. Thank you so much for the patience with a noob like myself! caret ^ escapes the parentheses, essentially stripping it of its properties as a command token. Doublequoting a string / argument containing...
- 07 Jan 2021 09:44
- Forum: DOS Batch Forum
- Topic: Batch File to edit specific line of Text file
- Replies: 58
- Views: 4537
Re: Batch File to edit specific line of Text file
The code seems to functions perfectly fine despite not opening a "start ezcad "file.ez" in the if E end program command. If i'm not explaning myself clear enough I can try explaining again. Set "Menu=Echo/[R]epeat [C]ontinue [E]xit&For /F "Delims=" %%G in ('Choice /N /C:RCE')Do If "%%G"=="R" ( Goto...
- 06 Jan 2021 14:08
- Forum: DOS Batch Forum
- Topic: Batch File to edit specific line of Text file
- Replies: 58
- Views: 4537
Re: Batch File to edit specific line of Text file
At a quick glance, you have multiple commands within your menu macro that are not concatenated.
- 28 Dec 2020 08:48
- Forum: DOS Batch Forum
- Topic: Where can I learn Batch?
- Replies: 4
- Views: 574
Re: Where can I learn Batch?
Thank you so much for the good resources and advice, T33ry! No worries, if your interested in arcade style games, Check out my game_engine.bat. The Archive mentioned above has a couple of demo games in there that exxample how to use it; and I'm more than happy to explain the how-to if asked One of ...
- 24 Dec 2020 09:27
- Forum: DOS Batch Forum
- Topic: Where can I learn Batch?
- Replies: 4
- Views: 574
Re: Where can I learn Batch?
Hi, I'm new to this forum and also the Batch language. I saw some games written in batch that were kinda cool, and I wanted to try to make my own. But I needed to know Batch. Where are some good learning resources for batch? Thanks Hi, Welcome to dostips. Some resources for getting started: https:/...
- 16 Dec 2020 20:37
- Forum: DOS Batch Forum
- Topic: color based on file extension
- Replies: 4
- Views: 691
Re: color based on file extension
Use an IF command to compare the file extension and call out to Carlos' Color Function . An alternative to the Color Function is to use a color macro @Echo off Setlocal DisableDelayedExpansion If "!![" == "[" ( Echo/%%COL%% macro must be defined prior to delayed expansion being enabled Goto :end ) ...
- 16 Dec 2020 10:47
- Forum: DOS Batch Forum
- Topic: Batch Games
- Replies: 31
- Views: 37627
Re: Batch Games
Been at it again. This time around it's more about the system I've developed than it is the game { The game is only to show how to use the system } Again, this one requires Antonio's getkey.exe for input, which is included in the below games archive link: Games Archive: https://drive.google.com/file...
- 12 Dec 2020 06:38
- Forum: DOS Batch Forum
- Topic: Best way to obfuscate a Batch File?
- Replies: 72
- Views: 63255
Re: Best way to obfuscate a Batch File?
Good call, T3RRY! @gfnowadmin Hint: Prepend an ECHO command to the lines that obviously contain the obfuscated script code. Maybe you can find out what it contains. At least my antivirus didn't even allow me to get to this point. The script has been removed instantly. Steffen https://imgur.com/a/02...
- 12 Dec 2020 05:50
- Forum: DOS Batch Forum
- Topic: Best way to obfuscate a Batch File?
- Replies: 72
- Views: 63255
Re: Best way to obfuscate a Batch File?
Going to offer you the benefit of the doubt reagarding ignorance, but in future run a basic scan before posting known malware to the forum.gfnowadmin wrote: ↑12 Dec 2020 00:05Can someone help me decode this file that was encoded with this tool ?
thanks in advance.
TrojanDropper:BAT/MalVbsDrper.C
- 08 Dec 2020 08:39
- Forum: DOS Batch Forum
- Topic: Batch Games
- Replies: 31
- Views: 37627
Re: Batch Games
Unfortunately I've not found a means to standardise delays that isn't impacted by the specs of a PC That is actually fairly simple. Treat your game as a movie, consisting of a series of static frames with incremental changes displayed sequentially to simulate motion. You want the frame rate to be c...
- 07 Dec 2020 21:41
- Forum: DOS Batch Forum
- Topic: Batch Games
- Replies: 31
- Views: 37627
Re: Batch Games
Your version of snake is pretty damn good. The only problem I had was some flicker, and on my old laptop it ran pretty slow. Unfortunately I've not found a means to standardise delays that isn't impacted by the specs of a PC I have two PC's I've tested this on. A gaming rig and an old student lapto...