Search found 2419 matches

by dbenham
11 Apr 2021 19:44
Forum: DOS Batch Forum
Topic: Clobbered cmd.exe!
Replies: 7
Views: 1778

Clobbered cmd.exe!

WTF :shock: :!: :evil: I just discovered my cmd.exe is suddenly missing, as are all my utility files that I keep in d:\utils and include in my PATH. God only knows what else is amiss. I did manage to find a copy of cmd.exe in Windows\SysWOW64. I think it happened a couple weeks ago when my computer ...
by dbenham
09 Apr 2021 16:36
Forum: DOS Batch Forum
Topic: Is there a way to obfuscate parts of a batch file?
Replies: 3
Views: 1385

Re: Is there a way to obfuscate parts of a batch file?

Also check out - https://www.dostips.com/forum/viewtopic.php?f=3&t=7990. Lots of good techniques there for obfuscating code. Nothing to obfuscate select portions, but that could certainly be developed. I feel like this topic has been explored fairly extensively, and I'm not too interested in revisit...
by dbenham
17 Mar 2021 06:59
Forum: DOS Batch Forum
Topic: Using multiple strings for FINDSTR - is this OK?
Replies: 3
Views: 1947

Re: Using multiple strings for FINDSTR - is this OK?

Variables to the rescue @echo off setlocal ::-- Define search strings set critical=/I^ /C:"ORA-"^ /C:"Fetch of Driver Member"^ /C:"Error: 3303"^ /C:"Error: 3304"^ /C:"Error: 3335"^ /C:"Error: 3336"^ /C:"Error: 3337"^ /C:"does not exist for the specified cube or you do not have access to it"^ /C:"Out...
by dbenham
03 Mar 2021 14:53
Forum: DOS Batch Forum
Topic: Foxidrive has left us
Replies: 35
Views: 26097

Re: Foxidrive has left us

The 15th post in this thread says he died at 57 :(
Much too young.
by dbenham
03 Mar 2021 12:03
Forum: DOS Batch Forum
Topic: Foxidrive has left us
Replies: 35
Views: 26097

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: 35
Views: 26097

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: 1983

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: 4198

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: 4198

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: 4198

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: 1936

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: 27117

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: 27117

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: 2282

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...