Search found 178 matches

by Simon Sheppard
2023-Mar-01, 3:49 pm
Forum: Windows CMD Shell
Topic: Is there any way to modify a variable twice in the same IF comparison?
Replies: 7
Views: 7279

Re: Is there any way to modify a variable twice in the same IF comparison?

In your second script you have
call if %x% equ 1 (

call if is not supported (nor is CALL FOR, see https://ss64.com/nt/call.html )

If you remove the CALL then it works as expected.
by Simon Sheppard
2023-Feb-22, 12:47 am
Forum: Windows CMD Shell
Topic: Batch Script not Executing filename + Parameters
Replies: 4
Views: 85964

Re: Batch Script not Executing filename + Parameters

I don't think there is any easy way to do what you want, echoing out the values will always include a line return/termination. Some options to consider: 1) Capture all the values from the user into variables and construct & run the command. 2) Use the CLIP command to store all the items in the c...
by Simon Sheppard
2023-Feb-04, 10:28 pm
Forum: Windows CMD Shell
Topic: Putting the output of Tasklist into a variable?
Replies: 4
Views: 5521

Re: Putting the output of Tasklist into a variable?

Try running

Code: Select all

tasklist /nh /v /fi "WINDOWTITLE eq Untitled - Notepad" 1>demo.txt
and see if that puts the message into the file, if not it may be using the error stream, so try it with 2>demo.txt
by Simon Sheppard
2023-Feb-04, 6:01 pm
Forum: Windows CMD Shell
Topic: Putting the output of Tasklist into a variable?
Replies: 4
Views: 5521

Re: Putting the output of Tasklist into a variable?

When I run your code it returns
INFO:
The first token from the FOR command, which is what I'd expect, if you arent getting that, then something else is going on.
by Simon Sheppard
2023-Jan-28, 4:07 pm
Forum: General Tech News, Notes and Queries
Topic: Unicode font containing all signs - does it exist?
Replies: 3
Views: 13566

Re: Unicode font containing all signs - does it exist?

Catrinity is also a good option
https://catrinity-font.de/

Code2000 always looked kinda ugly to me, I think if the standard English alphabet looks bad, then the foreign language characters are probably even worse.
by Simon Sheppard
2023-Jan-24, 8:17 pm
Forum: Meta: Site Feedback / Forum Q&A
Topic: A need for new section
Replies: 1
Views: 12670

Re: A need for new section

Good idea, I just renamed that section to be more inclusive of general Tech questions.

Thanks
by Simon Sheppard
2023-Jan-14, 4:04 pm
Forum: Windows CMD Shell
Topic: Westlake tee and other tools
Replies: 4
Views: 3258

Re: Westlake tee and other tools

I stopped hosting these last year, because there was almost zero traffic, so I think everyone with an interest in these old utilities has already downloaded them. Also they are showing their age, there are no 64 bit versions and they are unsupported. For now I have put a redirect in place to the geo...
by Simon Sheppard
2022-Dec-19, 12:26 am
Forum: Windows CMD Shell
Topic: Will all versions of Windows ignore a lone caret on the command line?
Replies: 4
Views: 10368

Re: Will all versions of Windows ignore a lone caret on the command line?

If you have a caret at the end of a line, that can have the effect of escaping the CR at the end of the line, which may have undesirable effects depending what is on the next line. It involves writing more code, but I would prefer to test for empty values and then branch to a different subroutine ac...
by Simon Sheppard
2022-Dec-19, 12:16 am
Forum: Windows CMD Shell
Topic: Read a file, output each line to a new file, preserve all characters?
Replies: 8
Views: 6527

Re: Read a file, output each line to a new file, preserve all characters?

An approach I have used is to replace all the problem characters with something else, either a character like ~ or ` use a unique phrase "Gr33nTreez"

Then do all your processing and then rename the characters back to what they started as.

https://ss64.com/vb/syntax-replace.html