Search found 3 matches

by qwerty
2021-Dec-21, 6:18 pm
Forum: Windows CMD Shell
Topic: Box Drawing and Prompt
Replies: 1
Views: 236

Re: Box Drawing and Prompt

Keep in mind, you can capture the ESC character as a variable and then use it with the appropriate terminal escape sequence to indicate the color:

Code: Select all

for /f %%e in ('echo prompt $E^|cmd') do set "\e=%%e"
echo %\e%[97m
by qwerty
2021-Dec-21, 1:18 pm
Forum: Windows PowerShell
Topic: prepend each object
Replies: 2
Views: 212

Re: prepend each object

Thank you, Simon. That worked like a charm. I just had to add the single quote ' back in front of Total Physical Memory. Thank you also for the links for more information.
by qwerty
2021-Dec-20, 2:48 pm
Forum: Windows PowerShell
Topic: prepend each object
Replies: 2
Views: 212

prepend each object

I'm relatively new to powershell, so forgive me for what is likely a simple question. Is there a way to prepend text to individual objects like this: $objects = systeminfo.exe /FO CSV 2>&1| ConvertFrom-Csv; $objects.'Total Physical Memory'; $objects.'Available Physical Memory'; $objects.'Virtual...