Search found 7 matches

by qwerty
2022-Jun-08, 6:27 pm
Forum: Windows CMD Shell
Topic: DELTREE is NOT a command!
Replies: 3
Views: 2737

Re: DELTREE is NOT a command!

It seems that the deltree command was added to MS-DOS in version 6.0: https://books.google.com/books?id=u7oN ... &q&f=false
by qwerty
2022-Apr-12, 5:07 pm
Forum: Windows CMD Shell
Topic: How to differentiate between similar filename extensions?
Replies: 6
Views: 4732

Re: How to differentiate between similar filename extensions?

Another way to do this is with the where command. To search from your present directory:

Code: Select all

where ".:*.jpe"
You can replace the period with the exact file location if you want to search another directory:

Code: Select all

where "C:\Users:*.jpe"
Another option is forfiles:

Code: Select all

forfiles /M *.jpe
by qwerty
2022-Jan-20, 7:20 pm
Forum: Windows CMD Shell
Topic: stampme.cmd anyway to make it use 2 digit month and day and am/pm
Replies: 4
Views: 5467

Re: stampme.cmd anyway to make it use 2 digit month and day and am/pm

Thanks for the heads up! That robocopy script failed for me on the latest Windows 10, but this version looks promising @echo off for /f "tokens=1-6 delims=/: " %%a in ('robocopy "|" . /njh ^| find ":"') do ( set "_year=%%a" & set "_month=%%b" &a...
by qwerty
2022-Jan-19, 3:16 pm
Forum: Windows CMD Shell
Topic: stampme.cmd anyway to make it use 2 digit month and day and am/pm
Replies: 4
Views: 5467

Re: stampme.cmd anyway to make it use 2 digit month and day and am/pm

Hi Simon. I don't think that version of the robocopy command from user npocmaka is language independent. However, you can force the date format of Robocopy with a command like this: robocopy "|" . /njh More information can be found in a lengthy DosTips discussion with the relevant suggeste...
by qwerty
2021-Dec-21, 6:18 pm
Forum: Windows CMD Shell
Topic: Box Drawing and Prompt
Replies: 1
Views: 2368

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

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

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