Search found 4554 matches

by aGerman
22 Jun 2025 06:38
Forum: DOS Batch Forum
Topic: How to overcome 32-bits math limitation of BAT if PS1 workaround alerts HIPS repeatedly?
Replies: 3
Views: 123

Re: How to overcome 32-bits math limitation of BAT if PS1 workaround alerts HIPS repeatedly?

Your uncommon 4-digit grouping works incorrectly. It repeats the last digit of the previous group as first digit in the next group. *.ps1 $NUMBER_A = [System.Decimal]1000000000000000000 $NUMBER_B = [System.Decimal]200000000000000000 $Result_in_bytes = $NUMBER_A - $NUMBER_B $KB = $Result_in_bytes / 1...
by aGerman
05 Jun 2025 09:35
Forum: DOS Batch Forum
Topic: Folder Deletion
Replies: 1
Views: 250

Re: Folder Deletion

It's not quite clear to me what you're trying to do. However, you could try something like that: @echo off for /d /r "C:\Users\user\somewhere" %%p in ("*.orph") do ECHO rmdir "%%p" /s /q PAUSE Update the path after the /r option accordingly and run it. The script doesn't do any harm yet, it only dis...
by aGerman
01 Jun 2025 11:16
Forum: DOS Batch Forum
Topic: Stack Overflow article.
Replies: 5
Views: 2009

Re: Stack Overflow article.

Forty years ago, my father used to say, "You young people are getting dumber and dumber. I know the multiplication tables by heart. You even enter 5x5 into your pocket calculator." My father was totally right. Sometimes I can't recall parts of the multiplication tables. Why? Because I don't frequent...
by aGerman
20 May 2025 10:45
Forum: DOS Batch Forum
Topic: edit command (CLI text editor) returns to Windows
Replies: 3
Views: 7959

Re: edit command (CLI text editor) returns to Windows

Thanks for the short notice. I've updated the topic to let the younger audience know that this is a feature that dates back to the old days, before 64-bit machines became common. The edit.com editor was a 16-bit tool that (if I recall correctly) was still shipped with the 32-bit version of Windows 7...
by aGerman
11 May 2025 16:20
Forum: DOS Batch Forum
Topic: Accessing the Control Panel.
Replies: 8
Views: 1544

Re: Accessing the Control Panel.

I checked all menu items in the English version. All work as expected. One minor flaw in the graphics - the date format is localized (like many other things in Batch). In my environment it's only 10 characters DD.MM.YYYY. Something like %DATE:~0,15% can't make it longer. Fixing this is easy though. ...
by aGerman
11 May 2025 12:49
Forum: DOS Batch Forum
Topic: Accessing the Control Panel.
Replies: 8
Views: 1544

Re: Accessing the Control Panel.

The subroutine comes at the very end of your script, after your current code. Calling it to initialize the macro somewhere at the beginning, e.g. after @echo off or after setlocal. (The explanation about the meaning of the "magic numbers" is of course only a comment for those who are interested in w...
by aGerman
11 May 2025 08:53
Forum: DOS Batch Forum
Topic: Accessing the Control Panel.
Replies: 8
Views: 1544

Re: Accessing the Control Panel.

I just hope that the script really directs to the right interfaces That's precisely what I want to know. Don't worry. If it works in Spanish, then it works in any other language as well. The parameters you pass to get to the different interfaces are not localized. Actually, what I want is to preven...
by aGerman
11 May 2025 03:53
Forum: DOS Batch Forum
Topic: Accessing the Control Panel.
Replies: 8
Views: 1544

Re: Accessing the Control Panel.

Hello Eduardo, I'm running the latest Windows 11 with German language settings. However, it seems to work and out of my experience it should work on Win 10 English as well in that case. As I don't speak Spanish, I just hope that the script really directs to the right interfaces. Just to add... - Peo...
by aGerman
04 May 2025 04:20
Forum: DOS Batch Forum
Topic: …and we’re back!
Replies: 3
Views: 3389

Re: …and we’re back!

The certificate expires once after three months, the admin said. Usually it gets renewed automatically. It's unknown why it didn't happen to work this time.
by aGerman
24 Feb 2025 10:23
Forum: DOS Batch Forum
Topic: CTRL-C "copy to clipboard", is there a way to make it a file? and extra question
Replies: 4
Views: 5275

Re: CTRL-C "copy to clipboard", is there a way to make it a file? and extra question

can i try the application?
Only if you write such an application :lol: I don't have something like that lying around.
by aGerman
23 Feb 2025 06:54
Forum: DOS Batch Forum
Topic: CTRL-C "copy to clipboard", is there a way to make it a file? and extra question
Replies: 4
Views: 5275

Re: CTRL-C "copy to clipboard", is there a way to make it a file? and extra question

To handle the clipboard you need to involve other languages like PowerShell, VBScript or JScript. https://www.dostips.com/forum/viewtopic.php?f=3&t=3058 Furthermore I'm not aware of any command to override Ctrl+C because the keyboard input is send to the application with the keyboard focus. In a Win...
by aGerman
23 Feb 2025 06:28
Forum: DOS Batch Forum
Topic: recursive dir name reading to make dir named batches(only 2 bytes used from reading)
Replies: 8
Views: 6754

Re: recursive dir name reading to make dir named batches(only 2 bytes used from reading)

First of all I guess I still misinterpreted things. You're running DOSBox-X rather than DOSBox. The little experience I have is with DOSBox (10 or 15 years ago I had to work around an old printer software on our shop floor ...). I don't know anything about DOSBox-X and how it behaves. i actually do ...
by aGerman
23 Feb 2025 04:14
Forum: DOS Batch Forum
Topic: recursive dir name reading to make dir named batches(only 2 bytes used from reading)
Replies: 8
Views: 6754

Re: recursive dir name reading to make dir named batches(only 2 bytes used from reading)

I think the problem lies somewhere else. set "T1=C:\Utility\DOSBox-X\BatchBox" This indicates that you're running code in DosBox that implements its own command line interpreter. It inherently supports only a narrow subset of the commands of the old "command.com". this is an old DOS What exactly? If...
by aGerman
19 Feb 2025 13:25
Forum: DOS Batch Forum
Topic: disable x button
Replies: 10
Views: 12206

Re: disable x button

miskox wrote:
19 Feb 2025 11:52
And as you mention I can add additional check for the current directory.
You can explicitly add the current work dir to PATH for the running cmd session.

Code: Select all

set "path=.;%path%"
After that, the expansion using ~$path: takes it into account.

Steffen
by aGerman
19 Feb 2025 10:12
Forum: DOS Batch Forum
Topic: disable x button
Replies: 10
Views: 12206

Re: disable x button

Calling a non-existing tool will make the CMD to throw an error. Regardless if you call it with or without an argument. So isn't that the same thing? : set user_"list=#JOHN#JANE#MARY#JILL#MIKE#" call set "tmp_str=%%user_list:#%username%#=X%%" if not "%tmp_str%"=="%user_list%" disableX.exe If you wan...