New answers tagged

0 votes

Setting codepage 1252 in Windows 11 still gets cp 850 in terminals

Change system locale could help On Windows 11 -> start -> type Control panel -> change date, time or number formats -> Administrative -> Change system locale -> Russian
Denis P.'s user avatar
  • 101
0 votes
Accepted

Passing a variable to a variable within a batch file

Without wanting to be repetitive, but what happens inside the For loop is valid inside the loop, unless you define it inside the For loop for use inside or outside the loop. But it may also occur to ...
Io-oI's user avatar
  • 8,105
0 votes

Passing a variable to a variable within a batch file

%%b is only valid inside the FOR loop. You should replace echo %%b by set var=%%b, then use %var% in the following code. You may put echo %var% after the FOR loop to verify its value.
harrymc's user avatar
  • 475k
0 votes

Shutdown command prompt strange behavior

I had the same situation that occurred on my Windows 2019 server running IBM Datastage which I finally figured out! I was getting this error when running shutdown.exe (usually trying to schedule a ...
G_Style's user avatar
  • 150
7 votes

What is wrong with this "move" command?

The issue is the *.* at the end of the destination. That doesn't belong there, as you have already specified a destination directly where the HTML files (with whatever filenames they are) will be ...
Yisroel Tech's user avatar
  • 10.6k
0 votes

cmd Copy command to multiple folders

Without your paths, command would look like; for /d %I in ("C:\KData\Data-*") do copy "C:\Tfolder\Test.txt" "%I" In case your structure changes to just DataSomething and ...
Danijel's user avatar
  • 136
-1 votes

ssh <username>@<localhost> failed on cmd

Just had this - it was an IP address conflict.
SamAndrew81's user avatar
-1 votes

Entering cmd into the file explorer address bar not working

For others having this issue. It turned out the directory I was in was zipped. Once extracted, typing cmd in the address bar worked as expected.
Metcalfe's user avatar
1 vote
Accepted

Windows tar command: exclude folder in current folder but not subfolders

The Windows tar command is bsdtar from libarchive, not the GNU tar found on Linux. The pattern syntax used by libarchive is not documented (docs claim it is like tcsh's glob syntax but that doesn't ...
u1686_grawity's user avatar
0 votes

I get question marks whenever I try to list netsh interface names on cmd

You could always use powershell commands for it. The below command will show each interface with an 'f' in the name, then update the jumbo packet assignment. get-netadapter | where-object { $_.Name -...
Paul McDowell's user avatar
10 votes
Accepted

Windows: cmd.exe history (F3, F7, arrow keys, etc) stops working when running cmd.exe nested within itself

This particular feature is not provided by Cmd – it's actually provided by Conhost, the program that draws the 'legacy' console window (and is still involved behind the scenes even if you're using ...
u1686_grawity's user avatar
0 votes

How to Access and Inspect `edge://translate-internals` via CMD-Batch or PowerShell?

You could extract the page to a file and then manipulate the file. The only option I have found for that is : start msedge --headless --print-to-pdf=[pdf-destination-path] [website-path] You may then ...
harrymc's user avatar
  • 475k
0 votes

(SOLVED) how to enable and disable device in one batch file

SOLVED. Thanks to io-oi reply I have a working script @echo off & setlocal pushd %__AppDir__% && 2>nul =;( reg.exe query HKCU\Environment /d /e /f on|find.exe /i "Click" ...
user2048695's user avatar
0 votes

How Can I Change File Explorer's Default View to "Details" and Group by Type Using CMD/Batch or PowerShell?

The post Need help decoding registry binary data contains an outstanding answer by Keith Miller, from which I quote this small part: Once a folder has been viewed in Explorer, Windows saves the view ...
harrymc's user avatar
  • 475k
5 votes
Accepted

Merge multiple files into 1 file with a newline character between the contents of each file in command line

In Windows, you can use the following command: type test1.txt > merged.txt && echo. >> merged.txt && type test2.txt >> merged.txt I'll explain each part: type test1....
Luis Alberto Barandiaran's user avatar
3 votes

Merge multiple files into 1 file with a newline character between the contents of each file in command line

Since type is an MS DOS, command, you are working on Windows. I have always used copy copy /a test.txt + test2.txt 3.txt /a tells it that they are ASCII files. The first two are source and the last ...
Rohit Gupta's user avatar
  • 3,458
0 votes

How can I put 2 different texts of 1 color each in a BAT file?

@(cls & color 1f & cd. & goto %:^)) _______ ______ _______ _______ _______ __ __ ____ | || _ | | || || | ...
Io-oI's user avatar
  • 8,105
2 votes

How to get ASCII art text to be displayed when I opened my .bat file?

@echo off findstr /e "_ |" "%~0" & timeout -1 & exit _______ ______ _______ _______ _______ __ __ ____ | || _ | | || || | ...
Io-oI's user avatar
  • 8,105
1 vote

How can I put 2 different texts of 1 color each in a BAT file?

Use ANSI escape codes, as were used in terminals and printers. There's an excellent demo batch file at GitHub. View it in Notepad++ or other code editor to see special characters, such as ASCII(27), ...
DrMoishe Pippik's user avatar

Top 50 recent answers are included