Thanks Compo (and Carlos and the rest of the team that developed and tested that CHCP method). That helps a lot - I feel much better about capturing the active code page now.
I've updated the first post in this thread to version 1.8 with the recommended change.
Dave Benham
Search found 2429 matches
- 19 Jan 2021 21:32
- Forum: DOS Batch Forum
- Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
- Replies: 61
- Views: 92218
- 19 Jan 2021 13:21
- Forum: DOS Batch Forum
- Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
- Replies: 61
- Views: 92218
Re: HASHSUM.BAT v1.7 - emulate md5sum, shasum, and the like
I've edited the first post in this thread to version 1.7. I adopted andresp's idea of using code page (CP) 65001 (UTF-8) to support file names that contain characters that are not in your active code page. However, the feature has not been adequately tested in my mind, so I only activate CP 65001 if...
- 17 Jan 2021 06:21
- Forum: DOS Batch Forum
- Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
- Replies: 61
- Views: 92218
Re: HASHSUM.BAT v1.6 - emulate md5sum, shasum, and the like
The very first post of this thread always has the most recent version (currently v1.6). That version should work as long as all characters in filenames are supported by your active code page. I did not incorporate andresp's suggested changes to support all unicode charcters in file names As for the ...
- 12 Jan 2021 09:21
- Forum: DOS Batch Forum
- Topic: CALL JREPL not returning "wanted" results.... help
- Replies: 2
- Views: 2827
Re: CALL JREPL not returning "wanted" results.... help
Much better, though that should give you two lines of output since 0.27.0 appears twice in your source. If you want only one then you need to figure out rules for how to choose which one you want. Also, your pattern might give the wrong result if the source includes something like the following: 123...
- 05 Jan 2021 17:22
- Forum: DOS Batch Forum
- Topic: jTimestamp.bat date/time utility v2.1 - Replacement for getTimestamp.bat
- Replies: 26
- Views: 34602
Re: jTimestamp.bat date/time utility v2.1 - Replacement for getTimestamp.bat
Currently there is no option to use a different week definition - only ISO 8601 is supported. I considered trying to support additional standards, but opted not to do so. The math should not be too hard, but establishing a sensible/workable set of options and display syntax just became a bit overwhe...
- 22 Dec 2020 07:18
- Forum: DOS Batch Forum
- Topic: JREPL Usage - read text file with commas and replace empty value
- Replies: 12
- Views: 10288
Re: JREPL Usage - read text file with commas and replace empty value
You will have to test for and delete the empty file after JREPL finishes. There are any number of ways. Here are a couple:
Dave Benham
Code: Select all
findstr "^" "%FDMEE_BIN%%ERR_FILE%" >nul || del "%FDMEE_BIN%%ERR_FILE%"
for %%F in ("%FDMEE_BIN%%ERR_FILE%") do if %%~zF == 0 del "%FDMEE_BIN%%ERR_FILE%"
Dave Benham
- 17 Dec 2020 10:42
- Forum: DOS Batch Forum
- Topic: JREPL Usage - read text file with commas and replace empty value
- Replies: 12
- Views: 10288
Re: JREPL Usage - read text file with commas and replace empty value
Sure. Simply add the /A option (only write altered lines) and change /O to your desired output file.
- 17 Dec 2020 08:55
- Forum: DOS Batch Forum
- Topic: JREPL Usage - read text file with commas and replace empty value
- Replies: 12
- Views: 10288
Re: JREPL Usage - read text file with commas and replace empty value
I don't see how commas within a field value pose any problem or complication. That is only a complication if the field delimiter also happens to be a comma. Skipping the first line is simple via the /EXC option. According to your sample data, the 18th field also is the last field in the record - Tha...
- 08 Dec 2020 08:00
- Forum: DOS Batch Forum
- Topic: Batch Games
- Replies: 31
- Views: 65193
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 08:21
- Forum: DOS Batch Forum
- Topic: On "color" command and errorlevel
- Replies: 8
- Views: 6643
Re: On "color" command and errorlevel
I had completely forgotten about this. It truly is an impressive work.
Dave Benham
- 06 Dec 2020 20:32
- Forum: DOS Batch Forum
- Topic: Batch Games
- Replies: 31
- Views: 65193
Re: Batch Games
Your snake game does not work for me on Win 10. It partially prints the initial screen, and then just hangs. I do hope you have seen my pure batch implementation of snake.bat - It has extremely smooth graphics, yet does not require any 3rd party exe file as long as you are on Win 10. If pre Win 10 t...
- 24 Nov 2020 10:36
- Forum: DOS Batch Forum
- Topic: ansi.bat: handling ANSI sequences in nowadays WIN terminals
- Replies: 8
- Views: 7507
Re: ansi.bat: handling ANSI sequences in nowadays WIN terminals
All cmd.exe output supports escape sequences. This includes prompt output, display of lines when ECHO is ON, and display of variable(s) value with SET command (variable name and/or value). But external commands invoked by cmd.exe do not have escape sequences enabled by default.
Dave Benham
Dave Benham
- 24 Nov 2020 09:04
- Forum: DOS Batch Forum
- Topic: ansi.bat: handling ANSI sequences in nowadays WIN terminals
- Replies: 8
- Views: 7507
Re: ansi.bat: handling ANSI sequences in nowadays WIN terminals
I wanted to provide match highlighting with JREPL.BAT without requiring the registry setting. JREPL uses JSCRIPT run by CSCRIPT to write output, so the escape sequences are not enabled by default. aGerman discovered that CSCRIPT can enable the escape sequences simply by running an innocuous PowerShe...
- 22 Nov 2020 08:16
- Forum: DOS Batch Forum
- Topic: Limited number of CALLs per line?
- Replies: 4
- Views: 4727
Re: Limited number of CALLs per line?
All can be explained once you understand how CALL/GOTO scan for labels. The label scanner reads until \r\n is found, or 512 bytes, whichever comes first. The code that has no error has the following at line position 1024: <space>:SUB So the label is found, and the routine starts on the next line (a ...
- 13 Nov 2020 17:51
- Forum: DOS Batch Forum
- Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
- Replies: 550
- Views: 1926487
Re: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
The documentation is pretty clear that /O - only works if you use /F to specify the input file name. It certainly does not work with a pipe. Also, it is simple to TYPE multiple files into a pipe, but then there is no concept of a file anymore - just one continuous stream. If you want to use JREPL to...