Search found 2389 matches

by dbenham
23 Jan 2021 14:42
Forum: DOS Batch Forum
Topic: SORT supports the /UNIQUE option!
Replies: 5
Views: 26

Re: SORT supports the /UNIQUE option!

And also on SS64, the /C (/CASE_SENSITIVE) option, again available since Win 7 - Now that is useful :!: :D
by dbenham
23 Jan 2021 14:35
Forum: DOS Batch Forum
Topic: SORT supports the /UNIQUE option!
Replies: 5
Views: 26

Re: SORT supports the /UNIQUE option!

Ooh, good for SS64.

So /UNIQUE can be abbreviated as /UNIQ

Also on SS64 is the undocumented /UNI-OUTPUT (or /U) that outputs in unicode (UTF16), available since Win 7. I did not know about that one either, though it is not of much interest to me.


Dave Benham
by dbenham
23 Jan 2021 14:01
Forum: DOS Batch Forum
Topic: SORT supports the /UNIQUE option!
Replies: 5
Views: 26

SORT supports the /UNIQUE option!

As I just learned at https://www.dostips.com/forum/viewtopic.php?f=3&t=9923&p=63727#p63726, SORT supports the /UNIQUE option, at least on Windows 10 :!: :D The built in help makes no mention of it, so it is no wonder that I've never seen this behavior before. Has anyone ever run across this option b...
by dbenham
23 Jan 2021 13:54
Forum: DOS Batch Forum
Topic: Request for help to speed up batch program for 17,000 TXT files
Replies: 2
Views: 30

Re: Request for help to speed up batch program for 17,000 TXT files

OMG :shock: :!: :!: :!: :!: The standard Windows SORT command supports the /UNIQUE option, at least on Win 10, even though it is not documented - I had no idea :!: D:\test>sort /? SORT [/R] [/+n] [/M kilobytes] [/L locale] [/REC recordbytes] [[drive1:][path1]filename1] [/T [drive2:][path2]] [/O [dri...
by dbenham
19 Jan 2021 21:32
Forum: DOS Batch Forum
Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
Replies: 60
Views: 36229

Re: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like

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
by dbenham
19 Jan 2021 13:21
Forum: DOS Batch Forum
Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
Replies: 60
Views: 36229

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...
by dbenham
17 Jan 2021 06:21
Forum: DOS Batch Forum
Topic: HASHSUM.BAT v1.8 - emulate md5sum, shasum, and the like
Replies: 60
Views: 36229

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 ...
by dbenham
12 Jan 2021 09:21
Forum: DOS Batch Forum
Topic: CALL JREPL not returning "wanted" results.... help
Replies: 2
Views: 228

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...
by dbenham
05 Jan 2021 17:22
Forum: DOS Batch Forum
Topic: jTimestamp.bat date/time utility v2.1 - Replacement for getTimestamp.bat
Replies: 26
Views: 18299

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...
by dbenham
22 Dec 2020 07:18
Forum: DOS Batch Forum
Topic: JREPL Usage - read text file with commas and replace empty value
Replies: 7
Views: 695

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:

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
by dbenham
17 Dec 2020 10:42
Forum: DOS Batch Forum
Topic: JREPL Usage - read text file with commas and replace empty value
Replies: 7
Views: 695

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.
by dbenham
17 Dec 2020 08:55
Forum: DOS Batch Forum
Topic: JREPL Usage - read text file with commas and replace empty value
Replies: 7
Views: 695

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...
by dbenham
08 Dec 2020 08:00
Forum: DOS Batch Forum
Topic: Batch Games
Replies: 31
Views: 37491

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...
by dbenham
07 Dec 2020 08:21
Forum: DOS Batch Forum
Topic: On "color" command and errorlevel
Replies: 8
Views: 1024

Re: On "color" command and errorlevel

Meerkat wrote:
07 Dec 2020 04:59
Today I revisited the amazing %mm% macro
I had completely forgotten about this. It truly is an impressive work.


Dave Benham