Search found 143 matches

by DOSadnie
18 Sep 2023 06:47
Forum: DOS Batch Forum
Topic: Closing CMD windows with PowerShell [SOLVED]
Replies: 4
Views: 2596

Re: Closing CMD windows with PowerShell

I have found the culprit: it is an active countdown in CMD window that is making it immune to being closed [...] as apparently CMD window with active timeout in it changes its name to such [...] And I have discovered a second [unrelated] case in which using of the timeout command creates an issue: ...
by DOSadnie
18 Sep 2023 06:44
Forum: DOS Batch Forum
Topic: How to interrupt script by closing the CMD window with any key?
Replies: 7
Views: 28382

Re: How to interrupt script by closing the CMD window with any key?

Apparently it is the timeout command that is creating this issue. Because such test script works @echo off setlocal enabledelayedexpansion echo. Press any key to close this BAT pause >nul exit /b i.e. pressing just once of even the >>w<< key closes it - while this version @echo off setlocal enablede...
by DOSadnie
14 Sep 2023 07:35
Forum: DOS Batch Forum
Topic: Move flashing prompt sign away from left edge of PowerShell window
Replies: 7
Views: 22811

Move flashing prompt sign away from left edge of PowerShell window

Is there a way to move the prompt sign in PowerShell [an also CMD] window more toward middle / right side of a it? So that a new empty line would flash it prompt sign as not being adjacent to the left edge of the window when awaiting for input from user? This almost does what I need # -The countdown...
by DOSadnie
10 Sep 2023 03:00
Forum: DOS Batch Forum
Topic: How to interrupt script by closing the CMD window with any key?
Replies: 7
Views: 28382

Re: How to interrupt script by closing the CMD window with any key?

This works; almost - just like my slightly reworked version [with descriptions for dummies like me]: @echo off echo. Commencing this script echo. PRESS ANY KEY TO CANCEL :: Set the latter >>timeout<< command in seconds: set LENGTH_OF_THE_COUNTDOWN=3 :: Check if the output ends with zero that is not ...
by DOSadnie
10 Sep 2023 01:28
Forum: DOS Batch Forum
Topic: Stop visible countdown from constantly scrolling its content to bottom of PowerShell window
Replies: 5
Views: 20164

Re: Stop visible countdown from constantly scrolling its content to bottom of PowerShell window

DOSadnie wrote:
21 Aug 2023 04:02
[...]
So is there maybe some way to eat a cake and have it - i.e. to see a countdown at the bottom of window but also be able to scroll up and not have the view constantly being scrolled / thrown down?
Any ideas, anyone?
by DOSadnie
06 Sep 2023 10:22
Forum: DOS Batch Forum
Topic: How to interrupt script by closing the CMD window with any key?
Replies: 7
Views: 28382

How to interrupt script by closing the CMD window with any key?

I wrote this BAT so that I would not have to perform by hand all such tasks needed to play the game @echo off :: welcoming text: echo. Commencing Apocalypse echo. PRESS ANY KEY TO CANCEL :: fail-safe: timeout /t 5 | findstr /R ".0$" >nul :: no-goes: taskkill /im HuionTablet.exe >nul 2>nul timeout /t...
by DOSadnie
21 Aug 2023 04:02
Forum: DOS Batch Forum
Topic: Stop visible countdown from constantly scrolling its content to bottom of PowerShell window
Replies: 5
Views: 20164

Stop visible countdown from constantly scrolling its content to bottom of PowerShell window

This OK working test script Write-Host "Line of text at the very top" Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host Write-Host...
by DOSadnie
17 Aug 2023 04:34
Forum: DOS Batch Forum
Topic: Wrong Color of texts [SOLVED]
Replies: 4
Views: 2313

Re: Wrong Color of texts

OK, thank you for your input

As for
DOSadnie wrote:
07 Aug 2023 15:28
[...]
DOSadnie wrote:
06 Aug 2023 16:08
[...]
how do I fix this?
[...]
Revert to defaults
[...]
I guess I would have to wipe out from Registry entries made there by my color adjustments to prove that theory right
by DOSadnie
11 Aug 2023 07:54
Forum: DOS Batch Forum
Topic: Deleting from a Recycle Bin folder all items except certain file formats
Replies: 13
Views: 17505

Re: Deleting from a Recycle Bin folder all items except certain file formats

I made some progress @echo off set "LIST OF VOLUMES=A B C T U V W X Y Z" set "PATH TO A RECYCLE BIN=\$Recycle.Bin" set "LIST OF EXCLUDED FILE FORMATS=.ape .cue .flac .m4a .mid .midi .mp3 .tta .wav .wv" for %%D in (%LIST OF VOLUMES%) do ( pushd "%%D:%PATH TO A RECYCLE BIN%" for /r %%A in (*) do ( set...
by DOSadnie
11 Aug 2023 02:44
Forum: DOS Batch Forum
Topic: Putting BAT on Taskbar or inserting it to Tray
Replies: 4
Views: 8810

Re: Putting BAT on Taskbar or inserting it to Tray

[...] " %ComSpec% /c " [...] [...] You just missed the /C switch in cmd.exe: [...] Yes, the problem was omission of /c in-between; thank you both However there is also caveat: I must run also run is as Administrator in order for it to push through its commands [of closing of various processes] How ...
by DOSadnie
09 Aug 2023 05:53
Forum: DOS Batch Forum
Topic: Putting BAT on Taskbar or inserting it to Tray
Replies: 4
Views: 8810

Putting BAT on Taskbar or inserting it to Tray

Is there a way to pin to Taskbar of Windows 10 a BAT file or an LNK leading permanently to it? Or to insert either of them to the Tray notification area? I tried pinning to Taskbar the cmd.exe and then setting its Target to C:\Windows\System32\cmd.exe "C:\MY SCRIPTS\test.bat" but it just opens CMD w...
by DOSadnie
09 Aug 2023 04:32
Forum: DOS Batch Forum
Topic: Closing CMD windows with PowerShell [SOLVED]
Replies: 4
Views: 2596

Re: Closing CMD windows with PowerShell

I have found the culprit: it is an active countdown in CMD window that is making it immune to being closed Even a BAT as simple as this one @echo off timeout /t 10 pause will not be closed until the timeout is finished, even if PS1 is using both methods Stop-Process -Name cmd -Force (Get-Process cmd...
by DOSadnie
07 Aug 2023 15:28
Forum: DOS Batch Forum
Topic: Wrong Color of texts [SOLVED]
Replies: 4
Views: 2313

Re: Wrong Color of texts

Yep [...] Is it because at Properties > Colors > I did change the default values? It sure looks like it: after adjusting those values once more for example my 3 yellows are no more- I only have that one legit Light Yellow at my disposal I have also noticed that if I create an LNK leading to this tes...
by DOSadnie
06 Aug 2023 16:08
Forum: DOS Batch Forum
Topic: Wrong Color of texts [SOLVED]
Replies: 4
Views: 2313

Wrong Color of texts [SOLVED]

The color /? stipulates usage of such colors 0 = Black 1 = Blue 2 = Green 3 = Aqua 4 = Red 5 = Purple 6 = Yellow 7 = White 8 = Gray 9 = Light Blue A = Light Green B = Light Aqua C = Light Red D = Light Purple E = Light Yellow F = Bright White But e.g. this script @echo off chcp 65001 >nul color 05 e...
by DOSadnie
05 Aug 2023 04:15
Forum: DOS Batch Forum
Topic: Timeout with GUI adjustments breaks its design after first second passes
Replies: 16
Views: 65082

Re: Timeout with GUI adjustments breaks its design after first second passes

test-1.bat [...] This works, thank you It shows Executing in: __X __The script has been executed I tried to improve it visually by making it to show Executing in: ______X __The script has been executed but this version @echo off setlocal enabledelayedexpansion for /f %%i in ('echo prompt $H ^| cmd'...