Search found 181 matches

by Simon Sheppard
2024-May-27, 12:27 am
Forum: Windows CMD Shell
Topic: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?
Replies: 1
Views: 409

Re: Why does "(title Test) & pause" change the window title to "Test - pause" and not to "Test"?

While the session is paused, the text "- pause" will be appended to the window TITLE. The only way I can think to prevent that would be setting a TITLE with lots of spaces at the end, up to the maximum length of 243 or 259 characters long. Then the additional "- pause" text will ...
by Simon Sheppard
2024-May-26, 9:41 pm
Forum: Windows CMD Shell
Topic: EchoAnsi
Replies: 2
Views: 357

Re: EchoAnsi

Jeb, you are a wizard!

But I think you missed out a % in the last line:

Code: Select all

echo %ESC%[41mHello world%ESC%[m
by Simon Sheppard
2024-May-17, 12:05 am
Forum: Windows CMD Shell
Topic: EchoAnsi
Replies: 2
Views: 357

EchoAnsi

Here is an alternate version of the EchoAnsi script available here: https://ss64.com/nt/syntax-ansi.html This version uses 3 nested loops to repeat every valid colour combination The forum swallows Esc characters, so to make this work you will need to replace the 3 escape characters on the second la...
by Simon Sheppard
2024-Apr-20, 10:32 am
Forum: Meta: Site Feedback / Forum Q&A
Topic: Password generator
Replies: 1
Views: 1713

Re: Password generator

I'm sure it wouldn't be too hard to save the page and add a couple of Mid$ functions to the JavaScript to do that. There are however some reasons to avoid having fixed place-holders in a password. Firstly, should one of your passwords ever be involved in a data breach, then those dashes could act as...
by Simon Sheppard
2024-Mar-08, 6:27 pm
Forum: Windows CMD Shell
Topic: Get a sorted list of the files in Windows OneDrive.
Replies: 4
Views: 1621

Re: Get a sorted list of the files in Windows OneDrive.

You can get to the OneDrive synchronisation folder from the %OneDrive% variable

So

Code: Select all

dir /s %OneDrive%
or you can use Robocopy List:

Code: Select all

robocopy %OneDrive% c:\null /l /njh /njs 
This assumes all the files have been synced.
by Simon Sheppard
2024-Feb-26, 8:37 pm
Forum: Windows CMD Shell
Topic: Puzzled by Delims
Replies: 4
Views: 1637

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

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: 4
Views: 1637

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

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: 4
Views: 1663

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