Questions tagged [cmd.exe]
cmd.exe, or the Command Prompt, is the default command-line interpreter for many Microsoft-created operating systems.
3,040
questions
5
votes
2
answers
1k
views
How to run python from Windows cmd?
I make a lot of python scripts - like blah.py, in my scripts directory, which is in the path. I want to just type "blah" to execute blah.py.
but when I do - the file opens in visual studio ...
2
votes
0
answers
79
views
Issues with import-csv when launching .ps1 file with a .cmd file
I'm trying to write a PowerShell script that will read a CSV file with a list of groups and relevant information for those groups then write them to a registry file (long story). I originally hard ...
1
vote
4
answers
405
views
Batch Move files to sub-directory from list.txt
Good day.
I have researched this quetion on this site and can't find the answer I am looking for. Sorry to post something that sounds similar to other posts.
I have a text document "ListedFiles....
1
vote
1
answer
3k
views
Open network folder in a .bat file
How do I open a network folder with a .bat file?
explorer shell:NetworkPlacesFolder works like wonders in CMD but once I try to implement a path (e.g. \\104pc01-01\c$\), it simply doesnt work and I ...
0
votes
0
answers
28
views
Programmatically open new CMD and enter code *but not run it*? [duplicate]
Is it possible in Windows to programmatically launch a new instance of CMD, Terminal, or PS (doesn't matter which) and populate the input field with some arbitrary code, just like if a user was typing ...
3
votes
2
answers
250
views
findstr /X keeps printing lines with no matches
I'm using nslookup and findstr in a simple batch script to check if a website is up.
However findstr keeps printing lines which doesn't contain any matches.
The command goes like this:
nslookup ...
1
vote
3
answers
978
views
Can't open command prompt or run any .bat files
On my Windows 10 PC I'm trying to open a command prompt but nothing happens, regardless of how I try to do it. Trying from the start menu, from the actual .exe in C:\Windows, from Win+X menu, etc. ...
0
votes
2
answers
65
views
navigate through cmd to a folder that starts with P_
I have a problem.
I have a script where i want to move one File (here it starts with S_) to a folder, which always starts with P_.
It is the only folder in the directory, where i wanna move it to, but ...
0
votes
0
answers
89
views
Why does adding a filetype to PATHEXT cause invocations to say "Access is denied"?
My goal: to run a file hello.py on my %PATH% when I write hello.
What I've done:
Made sure .py is part of PATHEXT.
C:\Windows\System32>echo %PATHEXT%
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;....
0
votes
0
answers
220
views
iperf3 design GUI
I am designing GUI for iperf3.exe. When I run iperf3.exe, the text box appears after it finishes the process. I want to read output while doing the process. I try async method and task but all the ...
0
votes
0
answers
275
views
Windows Tar Command for Tape Drive
I am trying to generate a command using GNUTar for backing up a folder on Windows 10 to a few tapes (hence my use of multisession). I am using an elevated command prompt window and have cd-ed into the ...
0
votes
2
answers
1k
views
How can I extract a .zip file with 7zip with a cmd command?
I have the following problem:
I have a test.zip
This test .zip should be extracted to a "test" folder.
But i have a test1, test2..., test23. So no matter how its named, the folder should ...
1
vote
1
answer
277
views
Retrieving Hardware Interface Name from MAC or IP Address on Windows [duplicate]
I have some proprietary software that proxies some ethernet-connected device IPs to software IPs.
In order to map the proxy IPs back to the N ethernet connections, I am ARP'ing the proxy, Who has <...
2
votes
2
answers
137
views
"if not exist \\ip\SharedDirectory\." in batch file creates delay
I would like to open a network drive in the explorer. The network drive is hosted on a PC, that is sometimes connected by WLAN and sometimes connected by LAN. Because of that, it has two different IPs....
0
votes
0
answers
383
views
Autoconnect to UltraVNC machine using password in a script, but the hostname (VNC Server) is always empty
VNC Server Field
I'm making an GUI using PowerShell with a listbox and in that listbox there are hostnames. When I select it and hit connect, it should connect to that machine without entering a ...
0
votes
0
answers
4k
views
Pip Install Proxy Connection Issues
System details: Windows11, cmd.exe
Hey there!
I am facing an issue linked to pip package installation for python. I had no proxy set before the last week and I was using the command pip install ...
0
votes
0
answers
32
views
sftp connection from one server to another server [duplicate]
I want to connect to a sftp server from another sftp server.How do i do that.After i connect to a sftp server,at the sftp prompt i would need to connect to another sftp server.How can that be done and ...
1
vote
2
answers
375
views
How do I run a multiple commands with spaces using cmd and ampersands?
I am trying to run a sequence of commands using the cmd command, the /k switch, and && to separate each command in the sequence.
For example, I would like to run this command to change to one ...
-1
votes
1
answer
149
views
Mass Remove Prefix From A File. Png File [duplicate]
So here is a folder:
These files have a prefix number in the start its hard to rename every file is there a way i can do with command prompt? or anything else?
0
votes
1
answer
679
views
How to Rename Multiple Files at Once in Windows
So i'm trying to rename few videos in separate folders to same name
and i did it without using cmd, so i just used the search box on the right side
And searched to as mp4 files and named them to &...
0
votes
2
answers
64
views
How to run same cmd code across multiple folders
I'm trying to run same cmd code across multiple folders:
ffmpeg -i "00.mkv" -codec copy "00.mp4"
So i have few folders that have .mkv and would like to convert them into mp4 but ...
1
vote
1
answer
218
views
How to Sort and Move Files Based on their Extensions on Windows
I'm trying to sort and move files based on their extensions within Windows, and am following this tutorial using:
@echo off
for %%a in (".\*") do (
if "%%~xa" NEQ "&...
0
votes
0
answers
30
views
cwebp arguments in right order
I am writing a command line of cwebp to convert .png image to .webp to achieve best picture with lowest size, but I am confused in right order and right values of arguments.
cwebp -preset photo -sns ...
-1
votes
1
answer
142
views
Command Prompt Drive Switching Different From PowerShell [closed]
In Command Prompt, I can switch from the C:\ drive to the D:\ drive with the following (rather simplistic) command:
D:
I can also switch between different directories in the same drive with the cd ...
1
vote
1
answer
898
views
create windows firewall rule for traceroute
I want to create a windows firewall rule that allow outbound tracert.exe connections.
But when i:
go in the 'windows firewall with advanced security' panel
block all outboud connections
create a ...
0
votes
1
answer
180
views
How to kill a CMD in Windows knowing only the Title?
The first bat performs the restart of the second bat. I currently use taskkill but it kills all Java processes. I, on the other hand, should only restart START.BAT, which has "MyApplication1"...
2
votes
2
answers
684
views
Capturing CMD.exe Triggers for Ephemeral Pop-ups
I have a Windows 11.
At random point of time of the day, cmd.exe will pop up for a split second and then close again.
I have been trying to figure out how to capture what is triggering these creation ...
0
votes
0
answers
28
views
Disconnect Windows users programmatically [duplicate]
How can I easily disconnect all users (killing all apps running in background) whose name start with "KLTENE" ?
Currently, I proceed manually for each, which is tedious:
2
votes
1
answer
503
views
Java JDK installation per cmd on Windows machine
How can I install a JDK via cmd or with another file?
I have to reset my Windows PC regularly for security reasons and I don't always want to go through the setup menu.
A Batch or CMD file to install ...
1
vote
0
answers
106
views
Messed up Windows .ps1 file, and now can't open CMD or run any commands in Powershell
At some point, I created a startup file for cmd and powershell. Ending in .ps1 I think. I must have a typo in it or something because I now get this error in powershell when trying to run commands:
&...
0
votes
1
answer
56
views
CMD - separate windows
With Windows 11 now using Terminal to show CMD, or Powershell, or Windows Subsytem for Linux, or what-have-you...
Is there a way to open a new CMD window, in a new window? Not just as a new tab in an ...
0
votes
0
answers
490
views
Not able to use wireguard after Handshake
I am trying to run wireguard using the commands wireguard.exe /installtunnelservice "C:\wireguard\we.conf" for starting the tunnel and wireguard....
0
votes
0
answers
79
views
Why doesn't this bash/diff command work through Neovim?
I am using WSL bash (Ubuntu distribution).
From Windows command line, this works as expected:
bash -c 'diff test.txt -'
However when running the following through Neovim:
:w !bash -c 'diff % -'
This ...
0
votes
1
answer
108
views
Is there a simple way to review changes before writing file in Neovim on Windows?
I want to review changes I made to my file before I save it. Is it possible to do this, preferably without using vimrc or installing additional software? I'm using Neovim on Windows.
I tried one of ...
3
votes
2
answers
16k
views
Powershell / cmd command to change an AD users password
I have tried to find an answer to this but maybe it is just not possible.
So I have several AD Users for different tasks.
for-a.surname
for-b.surname
for-c.surname
And of course I have to change the ...
1
vote
2
answers
140
views
Maximize Google chrome every 10 mins Automate
Due to the nature of my job , I need to check chrome browser every 10 mins after that I minimize my browser and do entry work. Normally I'm using timers or alerts but is it possible automatically ...
1
vote
1
answer
117
views
Using powershell or cmd prompt to rename multiple files in multiple folder to the same name
i'm trying to get powershell or command promopt to help me rename 1 file (with a different name) which appears accross multiple folders and can't seem to make it work;
all the files that need to ...
0
votes
2
answers
174
views
How can I run an exe from stdout?
I have a .exe file hosted as a release on a Github project, it is my project so I know this file is secure as I have compiled it. https://github.com/USERNAME/PROJECT/releases/latest/download/TORUN.exe ...
-1
votes
1
answer
113
views
How to create Win 11 Pro Desktop Shortcut for FFMPEG
I have FFMpeg in the (x86) folder and I've permanently appended the fully qualified path to the environmental variables. Installing FFMPeg does not create an entry in Windows 11 Apps.
I can run ...
1
vote
0
answers
216
views
Flatten Folder Structure, Move Files from Sub-Folders to Main
In Windows command line, is there a way to bulk move all the contents of subfolders up some levels? In other words, a way to get rid of selected subfolders while keeping their contents? I would like ...
0
votes
2
answers
95
views
From a path, all files, including those stored in subfolders, but not the subfolder-structures themselves, only the files, are to be copied?
From path Y:\Server-MODS all files including those which are stored in subfolders, but not the subfolders themselves, but really only the files themselves are to be copied to the following path via ...
0
votes
0
answers
941
views
How to zip multiple folders in a directory separately
There are multiple folders in a directory which I want to zip individually with original FolderName.zip and after they are zipped delete the original folders. There are other zipped folders already ...
3
votes
1
answer
26k
views
Set folder permissions through CMD - MS Windows
I need to write a small Windows software (using VisualBasic PL) to create automatically folder trees, following a fixed structure; in particular, I have to create the main folder with several ...
0
votes
2
answers
255
views
How can I run dregcmd from VB silent and output results to a file
There's one result from dsregcmd that is crucial to what I need that other methods don't do related to Azure,dsregcmd /status.
It won't succeed if shelled out to cmd nor run from anything I have found ...
0
votes
0
answers
64
views
What's the difference between a directory symlink and a file symlink on Windows?
Why does mklink have a /d flag?
Why aren't all symlinks identical in how they work. Aren't directories just files anyway?
0
votes
1
answer
855
views
I can't create EFI partition (ESP) using Diskpart, on the hard drive
So I'm about to do one of my project: "Windows To Go without WinToGo" (don't care about it). The real problem is when I tried to create ESP to boot, it said:No usable free extent could be ...
0
votes
2
answers
330
views
Get COM Port (Gertec)
I need to locate "COM Port" of Gertec Device.
I tried some things that are just below, I used several other things too and I didn't succeed.
Using this instruction it returns me Gertec but ...
0
votes
1
answer
2k
views
PowerShell start-process -argumentlist: does not work with cmd.exe but works fine with notepad.exe
I'm scripting a .bat file for an event scheduler but I'm having a problem.
start-process notepad.exe -argumentlist 'C:\test.bat' -verb runas this works
start-process cmd.exe -argumentlist 'C:\test.bat'...
0
votes
0
answers
150
views
What is the cmd.exe command to determine the last mounted drive letter on Windows 11?
I'm trying to be able to determine on the command line (so that I can do it from my scripting language) the drive letter for the last mounted drive on Windows 11.
Up until recently, I have used the ...
1
vote
1
answer
863
views
Batch: How to show only errors in console output (ie redirect STDOUT to NUL and STDERR to CON)?
I'm trying to figure out how to show only errors on the console output (and suppress all other output) without redirecting to a file or using TEE, etc. I'm trying to get this to work for single ...