Search found 1983 matches

by penpen
06 Jun 2024 17:18
Forum: DOS Batch Forum
Topic: Cmdwiz - 54 operation cmd helper tool (now with Unicode)
Replies: 65
Views: 191595

Re: Cmdwiz - 54 operation cmd helper tool (now with Unicode)

It's not my utility, so without seeing the source code, I can only make more or less educated guesses. Therefore I can't say for sure that, what you described above, is caused by changes in OS and BIOS time. I only can say that unexpected changes to date and time might lead to unexpected issues and ...
by penpen
06 Jun 2024 05:13
Forum: DOS Batch Forum
Topic: Cmdwiz - 54 operation cmd helper tool (now with Unicode)
Replies: 65
Views: 191595

Re: Cmdwiz - 54 operation cmd helper tool (now with Unicode)

Above i only can see your Windows date and time, but your BIOS also tracks date and time on its own and depending on the function to detrmine time might affect the result.

penpen
by penpen
03 Jun 2024 16:29
Forum: DOS Batch Forum
Topic: Cmdwiz - 54 operation cmd helper tool (now with Unicode)
Replies: 65
Views: 191595

Re: Cmdwiz - 54 operation cmd helper tool (now with Unicode)

If i remember correcty, then 'cmdwiz.exe gettime' should return the passed time since system start in milliseconds. The return value is an integer, so you probably got an overflow, which is at least (uint) (-421671808) milliseconds, which is 44 days, 19 hours, 54 minutes, 55 seconds, 488 millisecond...
by penpen
01 Jun 2024 17:31
Forum: DOS Batch Forum
Topic: I think someone could make a convolutional neural net out of pure batch
Replies: 1
Views: 31931

Re: I think someone could make a convolutional neural net out of pure batch

Batch is Turing-complete (see https://www.dostips.com/forum/viewtopic.php?f=3&t=5751#p35676 ), so it should be able to compute artificial neural networks as well. It should also be easier to build in batch, because the set/a-command provides access to the evaluation of some basic numerical expressio...
by penpen
25 May 2024 14:15
Forum: DOS Batch Forum
Topic: (nearly) ieee 754 floating point single precisition
Replies: 47
Views: 70311

Re: (nearly) ieee 754 floating point single precisition

When i divide high by 2 (realized by high>>=1), then there is an underflow in case high contains an odd number. I don't want to lose that underflowed portion, so i force it to be the leading character of low (low=!c!!low!). But if the leading character of low is 0, then the set/a-command treats low ...
by penpen
24 May 2024 14:20
Forum: DOS Batch Forum
Topic: (nearly) ieee 754 floating point single precisition
Replies: 47
Views: 70311

Re: (nearly) ieee 754 floating point single precisition

Then this part how to do it? "normalize that value such That 1 <= decimal number (d) <2" Example ..... After (finally) looking at the code, I would say (in case i didn't msiread my code), that i used a strlength algorithm on d, to shift the first non 0 digit at the first place of after the decimal ...
by penpen
23 May 2024 17:13
Forum: DOS Batch Forum
Topic: (nearly) ieee 754 floating point single precisition
Replies: 47
Views: 70311

Re: (nearly) ieee 754 floating point single precisition

Yes, you got it right so far. If i remember right, then the basic idea is to start with a number string in scientific notation, transform that into a decimal floating point representation with exponent to base ten (sign, decimal number, exponent to base 10), transform that into a decimal floating po...
by penpen
17 May 2024 16:17
Forum: DOS Batch Forum
Topic: dir ????????.txt does not show only files with length of 8 characters
Replies: 7
Views: 18944

Re: dir ????????.txt does not show only files with length of 8 characters

I would guess that you might find the short names of some files (in case that feature is activated on your system).
You might test that by forcing the dir command to also display short filenames:

Code: Select all

dir /x "????????.txt"

penpen
by penpen
17 May 2024 16:13
Forum: DOS Batch Forum
Topic: Difficulty running powershell in a for loop due to unquoting and closing of parenthesis
Replies: 3
Views: 24122

Re: Difficulty running powershell in a for loop due to unquoting and closing of parenthesis

You have to escape the characters, that are not encapsulated within double quotes, which in the example should be everything colored red: powershell -command " Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorID | ForEach-Object { $_.PSObject.Properties | ForEach-Object { if ($_.Name -ne 'Ci...
by penpen
17 May 2024 15:53
Forum: DOS Batch Forum
Topic: What is this batch file doing (to make color text)?
Replies: 3
Views: 11537

Re: What is this batch file doing (to make color text)?

The for/f loop uses the prompt command to store the Backspace character into the envronment variable DEL. The set/p command stores the backspace character into a file with the name defined by the second parameter of the :colorText function. The findstr command searches for any non empty line in that...
by penpen
14 May 2024 05:36
Forum: DOS Batch Forum
Topic: pushd popd depend on batch filenames with which they run... why?
Replies: 13
Views: 47108

Re: pushd popd depend on batch filenames with which they run... why?

To be clear: There is no bug, only wrong expectations.
by penpen
10 May 2024 10:14
Forum: DOS Batch Forum
Topic: pushd popd depend on batch filenames with which they run... why?
Replies: 13
Views: 47108

Re: pushd popd depend on batch filenames with which they run... why?

You got sth wrong with "%~0\..", so let's consider starting the batch file "crysis2.bat" from the current directory "c:\ABC\Bin32". Here the string "%~0\.." is expanded to "crysis2.bat\..". The string neither starts with a "\\", nor with a vomue designator (like for example "X:"). Therefore it is a ...
by penpen
04 May 2024 15:35
Forum: DOS Batch Forum
Topic: pushd popd depend on batch filenames with which they run... why?
Replies: 13
Views: 47108

Re: pushd popd depend on batch filenames with which they run... why?

The reason why 'pushd "%~0\.."' works is pretty simple: Your batch file was successfully started from an initial location with the content of %0, so it must contain a path from the initial location to the batch file location. The 'pushd' command expects a path to a directory and doesn't expect any n...
by penpen
01 May 2024 18:47
Forum: DOS Batch Forum
Topic: pushd popd depend on batch filenames with which they run... why?
Replies: 13
Views: 47108

Re: pushd popd depend on batch filenames with which they run... why?

What exactly are you looking for, when you write "i will find a detour to find a parent dir name"? Are you looking for the parent name of the current directory, or the name of your currently running batch file's directory, or sth else? I suspect you might look for sth like the following: @echo off s...