Search found 187 matches

by Simon Sheppard
2024-Feb-22, 8:38 pm
Forum: Windows CMD Shell
Topic: Puzzled by Delims
Replies: 1
Views: 126

Re: Puzzled by Delims

There are two things you need to fix: Firstly, instead of delims==" you need to use delims=^=" You need to Escape the equals sign to prevent it from acting as a command delimiter (rather than a FOR delimiter), now you may be thinking there would be no logical case where another command wou...
by Simon Sheppard
2024-Feb-20, 5:17 pm
Forum: Windows CMD Shell
Topic: Certificate Storenames
Replies: 1
Views: 88

Re: Certificate Storenames

You can generate a list with:

Code: Select all

CertUtil -enumstore
by Simon Sheppard
2024-Feb-17, 10:05 am
Forum: Windows CMD Shell
Topic: Is there any universal way to redirect file operations to nul?
Replies: 3
Views: 188

Re: Is there any universal way to redirect file operations to nul?

My first thought would be to create a RAM Disk and direct all writes to that, they are very fast and will be automatically wiped at next reboot, so perfect for temporary storage. Writing to RAM avoids having a lot of read/writes to your SSD but at the cost of using some RAM. In Windows 11 you will n...
by Simon Sheppard
2024-Jan-29, 6:20 pm
Forum: Windows CMD Shell
Topic: Floating Point Numbers in batch
Replies: 0
Views: 1735

Floating Point Numbers in batch

First off let me prefix this by saying the easy and robust way to work with Floating point Numbers, is just passing them to PowerShell: powershell.exe 12.9999999 + 2105001.01 But if you really want to do this in batch: @Echo off :: Floating point Numbers to add :: These must contain a decimal point ...
by Simon Sheppard
2024-Jan-20, 2:55 pm
Forum: Windows PowerShell
Topic: Inserting PS1 to Tray notification area of Windows for its execution purposes
Replies: 5
Views: 13841

Re: Inserting PS1 to Tray notification area of Windows for its execution purposes

To use the system tray, I think you will need some kind of utility like activetray.com

You can of course drag a .cmd or .ps1 file on top of the PowerShell icon on the taskbar and PIN it.
Assuming you already have PowerShell.exe pinned, then just right click to select & run the pinned script.
by Simon Sheppard
2024-Jan-18, 12:17 am
Forum: Meta: Site Feedback / Forum Q&A
Topic: Font stack
Replies: 0
Views: 3533

Font stack

The font stack on SS64 now includes "Segoe UI Variable Static Text" for Windows 11 users.

On Mac, Linux and Windows 10 it should look unchanged.

Windows 10 users who want to try out the font can get it here:
https://learn.microsoft.com/en-us/windo ... downloads/
by Simon Sheppard
2024-Jan-17, 10:25 pm
Forum: Windows CMD Shell
Topic: TIMEOUT -T
Replies: 4
Views: 2157

Re: TIMEOUT -T

Good idea, I added a paragraph about that, thanks!
by Simon Sheppard
2024-Jan-13, 2:38 pm
Forum: Windows PowerShell
Topic: day of year: descendant, ascendant
Replies: 2
Views: 1411

Re: day of year: descendant, ascendant

$mydate = get-date $year = ($mydate).year $dayofYear = get-date -uformat "%j" $days = 365 if ([datetime]::IsLeapYear($year)) {$days = 366} Echo "Days in Year= $days" Echo "Day of year= $dayofYear" Echo "Diff= $($days-$dayofYear)" Days in Year= 366 Day of year...
by Simon Sheppard
2024-Jan-11, 5:33 pm
Forum: Windows CMD Shell
Topic: stringlength.cmd - just created - for anybody who can use it
Replies: 2
Views: 13148

Re: stringlength.cmd - just created - for anybody who can use it

I think the hash sign is there to cover the case where an empty string is passed. Otherwise set "s=" would remove the variable and cause errors. The indexing of a variable starts at 0 and the smallest number in the sequence (4096 2048 1024 512 256 128 64 32 16 8 4 2 1) is 1, so character 0...