Search found 1907 matches

by Aacini
22 Nov 2024 14:46
Forum: DOS Batch Forum
Topic: The Daily Calendar Puzzle
Replies: 3
Views: 3365

Re: The Daily Calendar Puzzle

@Saso, Yes... I didn't want to use wmic.exe to get the correct date in any locale so as not to complicate the code further... The whole point of this program is to solve the calendar puzzle... I found a small bug in the definition of pieces 2 and 3, and another when handling dates with day or month ...
by Aacini
18 Nov 2024 20:04
Forum: DOS Batch Forum
Topic: The Daily Calendar Puzzle
Replies: 3
Views: 3365

The Daily Calendar Puzzle

The "Daily Calendar Puzzle" is a toy comprised of a board with squares marked with the Month names, Days numbers and DayOfWeek names, and 10 different pieces that covers most squares, but leaves 3 spaces in the board. The goal of the puzzle is to place the pieces in a way that the 3 spaces correspon...
by Aacini
13 Nov 2024 04:11
Forum: DOS Batch Forum
Topic: Question about unattended or silent uninstallation
Replies: 5
Views: 5632

Re: Question about unattended or silent uninstallation

Try this: @if (@CodeSection == @Batch) @then @echo off rem Use %SendKeys% to send keys to the keyboard buffer set SendKeys=CScript //nologo //E:JScript "%~F0" rem Start the other program in the same Window start "" /B rundll32.exe dfshim.dll,ShArpMaintain ComponentesHarware.application, Culture=neut...
by Aacini
11 Nov 2024 11:28
Forum: DOS Batch Forum
Topic: Question about unattended or silent uninstallation
Replies: 5
Views: 5632

Re: Duda con desinstalación desatendida o silenciosa

You have not indicated the way to provide the confirmation... If it is just the Enter key, try: echo/| rundll32.exe dfshim.dll,ShArpMaintain ComponentesHarware.application, Culture=neutral, PublicKeyToken=b3fd472d4be1fc0f, processorArchitecture=msil If it is a "S" key, try: echo S| rundll32.exe dfsh...
by Aacini
09 Oct 2024 16:07
Forum: DOS Batch Forum
Topic: date and time format inconsistencies
Replies: 13
Views: 37867

Re: date and time format inconsistencies

You can also use my wmiClass.bat program that access the WMI Classes in an efficient way via JScript code. For example: @echo off setlocal EnableDelayedExpansion for /F %%a in ('wmiClass OS LocalDateTime') do set "%%a" echo LocalDateTime=%LocalDateTime% for %%a in ("Year=0,4" "Month=4,2" "Day=6,2" "...
by Aacini
04 Oct 2024 16:46
Forum: DOS Batch Forum
Topic: How to ramdomly select test cases among the test suite to run daily?
Replies: 11
Views: 27269

Re: How to ramdomly select test cases among the test suite to run daily?

goodywp, I am afraid I don't follow you... Hi Aacini, just realized that there are some issue regarding some characters as this From the attached two files, one input.txt and output.txt You can see this code did the job but also did some extra job such as orignal in input.txt = ----> in output.txt b...
by Aacini
03 Oct 2024 09:41
Forum: DOS Batch Forum
Topic: How to ramdomly select test cases among the test suite to run daily?
Replies: 11
Views: 27269

Re: How to ramdomly select test cases among the test suite to run daily?

Is MM/DD/YYYY your %DATE% format? If not, you need to adjust the m=%%a, d=%%b, values in the formula. Just open a cmd.exe command prompt window (click on Start, type cmd and select the black cmd.exe window), do a CD to the right directory, remove the @echo off line and run the program. You will see ...
by Aacini
02 Oct 2024 20:07
Forum: DOS Batch Forum
Topic: How to ramdomly select test cases among the test suite to run daily?
Replies: 11
Views: 27269

Re: How to ramdomly select test cases among the test suite to run daily?

Ok. What about this code? @echo off setlocal EnableDelayedExpansion rem Get today's DayOfWeek for /F "tokens=1-3 delims=/" %%a in ("%date%") do ( set /A "m=%%a, d=%%b, y=%%c, a=(m-14)/12, DOW=((1461*(y+4800+a))/4+(367*(m-2-12*a))/12-(3*((y+4900+a)/100))/4+d-32074)%%7" ) rem Create a list with the de...
by Aacini
02 Oct 2024 12:44
Forum: DOS Batch Forum
Topic: How to ramdomly select test cases among the test suite to run daily?
Replies: 11
Views: 27269

Re: How to ramdomly select test cases among the test suite to run daily?

Hmm... Although I completely understand what you need, there are several details that prevent me from writing any useful code. The most important point is: how do you know that a test case has already been run? Anyway, here there are a couple ideas: @echo off setlocal EnableDelayedExpansion set "bas...
by Aacini
29 Sep 2024 18:59
Forum: DOS Batch Forum
Topic: Open multiple CMD windows running pings, tracert etc and position them on screen
Replies: 2
Views: 24560

Re: Open multiple CMD windows running pings, tracert etc and position them on screen

Some time ago I developed a series of Auxiliary .exe programs as aid for Batch files. One of those programs is Window.exe that allows to manage cmd.exe windows in several ways; for example, to position the window at any place in the screen. The Batch file below solve this problem using Window.exe au...
by Aacini
25 Sep 2024 05:34
Forum: DOS Batch Forum
Topic: how do you rename a file or a dir or a string name to be lowered?
Replies: 3
Views: 21144

Re: how do you rename a file or a dir or a string name to be lowered?

Yes. The on screen help on REN command clearly specify: Change the name of one or more files. On the other hand, the help on MOVE command indicate: Move files and change the name of files and directories. Antonio PS - You should try to be much clear on your descriptions. Your problem is to rename a ...
by Aacini
11 Sep 2024 15:35
Forum: DOS Batch Forum
Topic: scrolling region test
Replies: 8
Views: 46728

Re: scrolling region test

Yes, you are right Sponge Belly. Ed Dyrenn first proposed this method: for /f "delims=#" %%a in ( '"prompt #$H# &echo on &for %%b in (1) do rem"' ) do ( set "%$Defines%=%%a" set "%$Defines%=!$BS:~0,1!" ) ... and then dbenham suggested this simplification: for /f %%a in ('"prompt $H&for %%b in (1) do...
by Aacini
10 Sep 2024 14:34
Forum: DOS Batch Forum
Topic: scrolling region test
Replies: 8
Views: 46728

Re: scrolling region test

miskox wrote:
10 Sep 2024 00:19
Then I guess Simon (SS64) should correct that info.

Saso
Yes, he already did...

Thanks a lot!

Antonio
by Aacini
09 Sep 2024 14:02
Forum: DOS Batch Forum
Topic: scrolling region test
Replies: 8
Views: 46728

Re: scrolling region test

Did I miss something? Saso Mmm... Maybe you missed this reply where I posted such a method for the first time more than 7 years ago... Such topic , posted on 2017/Aug/22, is particularly interesting. At the beginning, IcarusLives shows an example where he inserts a hardcoded ESC character into the ...
by Aacini
05 Sep 2024 21:49
Forum: DOS Batch Forum
Topic: scrolling region test
Replies: 8
Views: 46728

Re: scrolling region test

Interesting! :) I translated your code to printf.exe (version 2.81 with \e as ESC and enabled Virtual Terminal Processing). Here it is: @echo off mode con cols=80 lines=24 cls printf "%%s\n" /* format to show strings */ ^ " S C R O L L I N G T E S T" OUT ^< ^ "\e[21;0H===============================...