Search found 189 matches

by Simon Sheppard
2024-Feb-26, 8:37 pm
Forum: Windows CMD Shell
Topic: Puzzled by Delims
Replies: 3
Views: 175

Re: Puzzled by Delims

^ Ah good point, I edited my post to remove that, thanks
by Simon Sheppard
2024-Feb-26, 8:17 pm
Forum: Windows CMD Shell
Topic: Help with Robocopy script to move *EXTRA files and directories
Replies: 2
Views: 37

Re: Help with Robocopy script to move *EXTRA files and directories

The problem with the approach you are describing is that I don't think it will result in a complete backup. You are focussing on preserving copies of renamed or deleted files but there are lots of other situations when you may need an older copy of a file. e.g. if you edit a file and in the process ...
by Simon Sheppard
2024-Feb-22, 8:38 pm
Forum: Windows CMD Shell
Topic: Puzzled by Delims
Replies: 3
Views: 175

Re: Puzzled by Delims

instead of tokens=*
you need to use tokens=2

Otherwise you will break up the string into 2 parts and the * will just return both of them anyway.
by Simon Sheppard
2024-Feb-20, 5:17 pm
Forum: Windows CMD Shell
Topic: Certificate Storenames
Replies: 1
Views: 100

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: 207

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: 1763

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: 13938

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: 3606

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: 2183

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: 1440

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...