Search found 1164 matches

by ShadowThief
12 Jun 2024 21:14
Forum: DOS Batch Forum
Topic: plus sign in file name
Replies: 4
Views: 27878

Re: plus sign in file name

Not a known issue per se, but a known and expected behavior. This is the very last sentence of copy /? - To append files, specify a single file for destination, but multiple files for source (using wildcards or file1+file2+file3 format). Like all other special characters, you'll have to wrap the fi...
by ShadowThief
12 Jun 2024 06:35
Forum: DOS Batch Forum
Topic: plus sign in file name
Replies: 4
Views: 27878

Re: plus sign in file name

Not a known issue per se, but a known and expected behavior. This is the very last sentence of copy /? - To append files, specify a single file for destination, but multiple files for source (using wildcards or file1+file2+file3 format). Like all other special characters, you'll have to wrap the fil...
by ShadowThief
19 May 2024 07:50
Forum: DOS Batch Forum
Topic: What is this batch file doing (to make color text)?
Replies: 3
Views: 11522

Re: What is this batch file doing (to make color text)?

That used to be the only way to do colored text before VT100 sequences got added to Windows 10 and later.
by ShadowThief
03 May 2024 07:11
Forum: DOS Batch Forum
Topic: Mask password with Asterisk
Replies: 16
Views: 46194

Re: Mask password with Asterisk

No, because the entire code hinges on xcopy's /W flag, which waits for a single character to be pressed before continuing. It doesn't wait around to pick up the rest of the input.
by ShadowThief
02 Apr 2024 08:10
Forum: DOS Batch Forum
Topic: netsh Interface name store as variable
Replies: 10
Views: 29991

Re: netsh Interface name store as variable

Pipe a second findstr for "Ethernet"

Code: Select all

@echo off
for /f "tokens=3*" %%a in ('netsh interface show interface ^| findstr "Connected" ^| findstr "Ethernet"') do (
    set "AdapterName=%%b"
)
echo %AdapterName%
by ShadowThief
01 Apr 2024 16:31
Forum: DOS Batch Forum
Topic: what is the difference between 1> and 2>
Replies: 4
Views: 8041

Re: what is the difference between 1> and 2>

2 is for errors (STDERR), 1 is for everything else (STDOUT)

It doesn't matter if you put it at the front or the back of the command you're using it on, although there are a few edge cases where putting it at the front is better.
by ShadowThief
22 Mar 2024 22:54
Forum: DOS Batch Forum
Topic: if/elseif dont work like expected...Sorry, this time in English
Replies: 3
Views: 7311

Re: if/elseif dont work like expected...Sorry, this time in English

If that's the entire code, then you're missing the final )

You've also written cdm /k instead of cmd /k (although I don't see why you'd need that at all since it only spawns a child terminal process), but that throws a different error.
by ShadowThief
30 Jan 2024 13:41
Forum: DOS Batch Forum
Topic: SYSTEM account console 254 characters limit
Replies: 4
Views: 17355

Re: SYSTEM account console 254 characters limit

If you think you need the SYSTEM account for something, you're doing something wrong. If you need more than 254 characters for a single command, you're also doing something wrong. You haven't described your use case, so I'll just assume the standard reasons for shoving a bunch of code all at once at...
by ShadowThief
17 Jan 2024 13:26
Forum: DOS Batch Forum
Topic: Batch Parser
Replies: 2
Views: 8912

Re: Batch Parser

There's excellent documentation at https://stackoverflow.com/questions/409 ... se-scripts but I'm not aware of anything interactive.
by ShadowThief
07 Jan 2024 11:34
Forum: DOS Batch Forum
Topic: Is it worth learning Powershell?
Replies: 10
Views: 48597

Re: Is it worth learning Powershell?

I'm talking specifically about the language that uses the cscript and wscript interpreters. https://en.wikipedia.org/wiki/VBScript It's a scripting language for ActiveX that's modeled on Visual Basic and that I've used multiple times as standalone replacements for VBA macros that I've written. Wikip...
by ShadowThief
18 Nov 2023 19:25
Forum: DOS Batch Forum
Topic: The timeout command blocks the W key from closing CMD window
Replies: 3
Views: 23040

Re: The timeout command blocks the W key from closing CMD window

How could this be happening It's obviously a bug in the code. Nobody here is capable of elaborating further because Windows is closed source. more importantly: how to fix / workaround this issue? By pressing one of the 100+ other keys on the keyboard. This is such a non-issue that I'm surprised you...
by ShadowThief
05 Nov 2023 22:22
Forum: DOS Batch Forum
Topic: Problems working a script
Replies: 6
Views: 26471

Re: Problems working a script

That's just my answer, but with no explanations and posted here so they're going to see it even if they don't want to. The entire point of me posting it to pastebin was that this is very clearly a homework question and they asked for help and not a solution so they should have the option of not imme...
by ShadowThief
05 Nov 2023 18:21
Forum: DOS Batch Forum
Topic: Problems working a script
Replies: 6
Views: 26471

Re: Problems working a script

https://pastebin.com/Lh3gEWhL if you want answers rather than general guidance
by ShadowThief
05 Nov 2023 18:11
Forum: DOS Batch Forum
Topic: Problems working a script
Replies: 6
Views: 26471

Re: Problems working a script

The fact that you're saying that you haven't gotten it suggests to me that you have some way of validating the solution, and so this feels a bit like homework. Depending on your teacher's standards and whether or not you just didn't format the code when you pasted it in here, I could argue that ever...