Search found 2429 matches

by dbenham
03 Mar 2021 12:03
Forum: DOS Batch Forum
Topic: Foxidrive has left us
Replies: 42
Views: 180387

Re: Foxidrive has left us

I don't know if you took the time to follow the link, but I feel he was almost saying farewell in that post...
by dbenham
03 Mar 2021 10:27
Forum: DOS Batch Forum
Topic: Foxidrive has left us
Replies: 42
Views: 180387

Re: Foxidrive has left us

I just happened to reread this old post from foxidrive. It brings a tear to my eye every time I see it. :cry:


Dave Benham
by dbenham
02 Mar 2021 06:49
Forum: DOS Batch Forum
Topic: .cmd/.bat file size limit? Yes. 2GB
Replies: 2
Views: 5950

Re: .cmd/.bat file size limit? Yes. 2GB

Nice investigation. I never dreamed of testing such a thing. I always thought of the file size as "limitless", actually meaning bigger than I could ever need. But it makes sense that there would be a size limit, given that cmd must keep track of the byte offset within the file, and push that offset ...
by dbenham
25 Feb 2021 22:26
Forum: DOS Batch Forum
Topic: [How-To] Parse DateTime strings (PowerShell hybrid)
Replies: 14
Views: 18525

Re: [How-To] Parse DateTime strings (PowerShell hybrid)

aGerman wrote:
25 Feb 2021 16:20
Since ParseExact is always tried first, custom formats have higher priority.
Ah, cool. I assumed it would be in reverse. I see how it works now.

I also missed the culture variable option until just now.
by dbenham
25 Feb 2021 16:14
Forum: DOS Batch Forum
Topic: [How-To] Parse DateTime strings (PowerShell hybrid)
Replies: 14
Views: 18525

Re: [How-To] Parse DateTime strings (PowerShell hybrid)

If you include the ISO 8601 week number, then you should also add the week year. The week year and calendar year do not always match when dealing with a date within a week of january 1.
by dbenham
25 Feb 2021 15:44
Forum: DOS Batch Forum
Topic: [How-To] Parse DateTime strings (PowerShell hybrid)
Replies: 14
Views: 18525

Re: [How-To] Parse DateTime strings (PowerShell hybrid)

The documentation should specify that the output always uses the local time zone. The offset from UTC should be added to the output, preferably as minutes offset. Not all time zones are offset by an integral hour. I was surprised the custom format string works for input. I thought it was only used f...
by dbenham
24 Feb 2021 15:09
Forum: DOS Batch Forum
Topic: "msg" command runs from CmdPrompt but not from batch script
Replies: 3
Views: 5061

Re: "msg" command runs from CmdPrompt but not from batch script

Perhaps your batch script is corrupting your PATH variable?
by dbenham
22 Feb 2021 15:48
Forum: DOS Batch Forum
Topic: Colossal Cave Adventure in batch
Replies: 24
Views: 43490

Re: Colossal Cave Adventure in batch

I misremembered a bit. By default (behavior at start), the full location is given the first time you enter a room, and every 5th time you enter the room after that. If you use "look" (or "descr" for describe), then the long description will be prefaced with "Sorry, but I am not allowed to give more ...
by dbenham
22 Feb 2021 12:44
Forum: DOS Batch Forum
Topic: Colossal Cave Adventure in batch
Replies: 24
Views: 43490

Re: Colossal Cave Adventure in batch

Enter the command "look" I think there may be a bug of sorts. I believe the original Don Woods version of the game always gave the full description every time you enter a "room", unless you issue the command "brief". After issuing "brief", you only get the full description the first time you enter a...
by dbenham
18 Feb 2021 22:52
Forum: DOS Batch Forum
Topic: Apostrophe at beginning of file name
Replies: 6
Views: 6133

Re: Apostrophe at beginning of file name

Looks suspiciously like the symptoms of the FOR /F bug on XP when there are unescaped/unquoted token delimiters - FOR /F is mucking about with memory that it shouldn't (uninitialized pointer, or buffer overrun, or ...? ) https://www.dostips.com/forum/viewtopic.php?t=1972 I doubt you are using XP, an...
by dbenham
12 Feb 2021 19:26
Forum: DOS Batch Forum
Topic: Find All Files with Same Filename But Different Extension
Replies: 11
Views: 10563

Re: Find All Files with Same Filename But Different Extension

I think you have a fundamental problem with your goal requirements - as currently stated, I believe you can have ambiguous situations. Given files abc.rec and abc1.pdf, your rules state that those should be a pair. But then what happens if later on abc1.rec is added? You could argue the pdf can be p...
by dbenham
10 Feb 2021 20:11
Forum: DOS Batch Forum
Topic: Using RegEx on a pair of lines at same time?
Replies: 6
Views: 5547

Re: Using RegEx on a pair of lines at same time?

You can easily add the file size to the JREN output by incorporating the size() function into the replacement value. You can left pad the number to a constant width by passing in a string of spaces with the desired width. For example: size(" ") pads the size to length 15 (no commas) FINDSTR characte...
by dbenham
10 Feb 2021 19:41
Forum: DOS Batch Forum
Topic: JREPL Usage - read text file with commas and replace empty value
Replies: 12
Views: 10432

Re: JREPL Usage - read text file with commas and replace empty value

Probably just a typo, but you are missing the closing double quote. Beyond that, you are excluding if "USE FOR TERM" appears anywhere on the line, not just the first column. The code I gave you doesn't work because I mistakenly thought the entire first column must exactly match "(USE FOR TERM)" to b...
by dbenham
10 Feb 2021 15:13
Forum: DOS Batch Forum
Topic: Using RegEx on a pair of lines at same time?
Replies: 6
Views: 5547

Re: Using RegEx on a pair of lines at same time?

Best to work on file systems that have short names disabled - they generally aren't needed unless you deal with very old lecacy programs. I imagine that would greatly simplify your problem. But sometimes you don't have control over the file system configuration. I know no DIR form that shows paths T...
by dbenham
10 Feb 2021 12:22
Forum: DOS Batch Forum
Topic: JREPL Usage - read text file with commas and replace empty value
Replies: 12
Views: 10432

Re: JREPL Usage - read text file with commas and replace empty value

Of course it is possible. :wink: You are already using the /EXC option to ignore the 1st line. It can accept a comma delimited list of exclusions. (Use JREPL /?/EXC to see the full documentation). You just need to add an additional exclusion for lines that begin with your string. Since your string i...