Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cmd.exe]

cmd.exe, or the Command Prompt, is the default command-line interpreter for many Microsoft-created operating systems.

0
votes
0answers
3 views

What is a session in the context of Windows OS?

I am trying to learn this dos command, but I get lost about what is defined as a session here. https://ss64.com/nt/query-process.html I understand that a session is a timeframe of information ...
0
votes
0answers
11 views

printui.dll - could not find file

I want to make a script, that allows me to install printer automatically on computer, but my command line says that I'm missing file. My batch fails on line with printer installation. rundll32 ...
0
votes
0answers
10 views

wingnu32 env tool does not print variable

I found the tip to use the wingnu32 tool env from , which is installed on my Windows 10 device anyway, as Git and Docker are installed. However, I don't get it working as wished. It behaves as ...
0
votes
0answers
19 views

Changing file names based on their filetype extension [on hold]

So am kind of new to using command lines in Terminal and stuff. However, I was interested if someone could help me with this thing. I would prefer if somebody with Terminal knowledge can help, but ...
-1
votes
0answers
23 views

Replacement for Ninite [on hold]

I am the owner of a consulting business in the Netherlands, a lot of our clients have asked if we can set up their computers at home, so they need default virus protection and malware protection. What ...
0
votes
1answer
21 views

want to add reg using vbscript

vbs code are as following : Set oShell = CreateObject ("Wscript.Shell") Dim strArgs strArgs = "cmd /c REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RUN" /v "...
0
votes
1answer
31 views

Batch file not working

I am trying to run some commands in batch file on windows server 2012 but it's not working properly. What i am doing here. Get all files(.docx) from current directory in loop, convert file into pdf ...
1
vote
1answer
45 views

Highlight all the numbers in Cmd

How can I highlight the numbers in cmd? i.e, I want to highlight the numbers automatically when typing and in the old commands. How can I achieve this? I want to differentiate numbers from other ...
1
vote
1answer
19 views

No output from FOR loop over command

I've got some files I just committed in my git repo: C:\core\guidewire\Release\5.3_MT1\ClaimCenter>git diff --name-only head^^ ClaimCenter/modules/configuration/config/web/pcf/TabBar.pcf ...
0
votes
0answers
6 views

Auto highlight a custom syntax in cmd [duplicate]

I am trying highlight a syntax in cmd automatically when typing. Like in: C:\Users\User>echo "Hello" "Hello" C:\Users\User> In above command (echo "Hello") , I would like to change the color ...
0
votes
0answers
13 views

converting cmd commands into windows version

I started learning cURL and graphQL. Book tells me I need use this command line in terminal $ curl -H 'Content-Type:application/graphql' -XPOST https://www.graphqlhub.com/g\ raphql?pretty=true -d '{...
0
votes
1answer
34 views

Win10 python called from 'cmd' different than 'run' (2 versions installed)

I installed python 2.7 then needed to switch to python 3.5. I changed all my environment variables (system & user) to remove 2.7 from PATH (I don't want to remove python 2.7, just keep it in ...
-2
votes
1answer
83 views

I am looking for the code in batch that would allow me to Change the error code for ping “request times out” to any text I want

I would like to make a ping script that instead of saying "request timed out" it returns something else such as "offline." I want this to to be output while ping is running not after the command ...
0
votes
1answer
26 views

FART replace mulitple extensions

Is it possible to use FART for replace multiple extensions in 1 go? I already tried it with -f, but that goes only for 1 replace.
1
vote
1answer
62 views

7zip batch creates folders instead of filename

I have a simple Windows batch script, which is run by backup software as pre-backup action. It simply looks for latest SQL dumps, compresses them into 10-times smaller 7zip archive, then cloud backup ...
0
votes
1answer
16 views

git in cmd wrongly uses cygdrive

I'm on Windows 10 and installed Git git version 2.19.1.windows.1. I cd into a folder D:\Webs\bildresize2 that's a git repo and call git fetch. I get the error: fatal: 'C:/Program Files/git/cygdrive/...
2
votes
2answers
34 views

DOS moving specific .xml file extension [duplicate]

I want to move my .xml files from a directory (let's call it "from") to another (we'll call it "to") but using wildcards moves unwanted files like .xml_. How can I move them while being specific about ...
1
vote
1answer
63 views

Find name of computer attached to same network

I have two PCs connected to the same network. One is mine and there is one other. I want to find out the Name of the other PC using the command line. Please note: There are only two PC's connected to ...
2
votes
2answers
57 views

CMD.exe immediately resizes on invoke

Anytime I use cmd, the window shrinks and snaps to the top left corner of my screen . This happens regardless of terminal emulator (Visual Code integrated terminal, CMDer, "run -> cmd", Powershell -> ...
1
vote
2answers
108 views

Mysterious file appeared on Windows 10 and can't be deleted. Where does it come from?

I am using Win10 on Lenovo Ideapad 320 and I recently noticed that strange file on my background with the name ¨.. Yes, the name of the file is ¨.. I think it appeared sometimes while I was plugging ...
1
vote
2answers
120 views

Ping ip address and save result to txt file.

I am trying to open a list of ip address and ping them and then save the responce to a TXT file. The ping loops through and runs with out a problem and reports correctly but i can get it to save the ...
1
vote
2answers
100 views

Not Able to Replace Space with Character in Bulk Name Update

I have some images in a folder like van-map-PE 100-1.png van-map-PE 200-8.png van-map-PE 160-2.png van-map-PE 400-6.png Now I want to remove all spaces between PE xxx- and replace it with - like ...
0
votes
0answers
19 views

How do I make shortcuts like %UserProfile% in cmd myself? [duplicate]

I can't seem to find what I am looking for on google or this forum. Therefore I need to ask. So, how can I make a cmd shortcut, not a link, like %downloads% that gets me directly to the downloads ...
0
votes
1answer
26 views

Re-running a command prompt after termination

I'm currently using wget to download off of an archive, but after about 20 minutes, it terminates itself without downloading the rest of the files. However, every time I launch it, it manages to get ...
-1
votes
1answer
47 views

How to run an exe on remote machine using cmd?

If I want to copy a file on a remote server, I use the following command in cmd: xcopy \\source_file server_ip\path_to_where_the_file_should_go\file.exe The command above works and now I want to run ...
2
votes
1answer
43 views

Registry: Shell Open Command - Open multiple programs

I'm trying to register a shell open command via the registry and want to open more than one program, so I tried it like this: [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\myFile\Shell\Open\Command] @="cmd /k ...
0
votes
1answer
74 views

Is there anyway to know if my windows 7 was shutdown by the normal Menu or the shutdown command?

Is there anyway to know if in some specific day a Windows 7 computer was shutdown using the normal "Windows button > Click Shutdown" or using the shutdown /s /t (seconds) from the command line?
1
vote
1answer
22 views

How to find and delete a shortcut in any directory based on the shortcut destination?

How does one create a batch file to search all directories for, and delete, shortcuts which point to a specific destination (such as C:\App\Program.exe) without regard to the file name?
0
votes
1answer
63 views

Why does PowerShell behave differently than cmd.exe given the same command?

The question is probably best explained with the scenario, where I realized the two programs are operating differently. I had an old backup from my Linux days on my hard drive containing a file named ...
0
votes
0answers
33 views

Command prompt. Is it possible to create a certain number of variables according to the lines in a text file and then

Can we use a text file to set variables according to how many changing lines are there in the .txt file? files.txt name 1 text 2 info 3 ... and so on set line01="name 1" set line02="text 2" ...
0
votes
0answers
13 views

How to Jump from one server to another using plink commands

I want to login to one server then jump to a ssh server. Commands i am using is: plink -P 22 -l %user% -pw %pass% %host% -hostkey %hstkey% -ssh -P 22 -l %user2% -pw %pass% -batch -m ...
0
votes
0answers
31 views

Remove Wi-Fi known network from command line / net shell (profile not saved)

Is it possible to remove a Wi-Fi known network (see below) from the command line / net shell in Windows? Not a profile Known network from Windows 10: Settings -> Network & Internet -> WiFi -> ...
1
vote
3answers
113 views

Remove duplicates from variable using batch file

I have a batch file. Here I assigned some values to a variable. I want to remove duplicate values from the variable. @echo off set test=1,2,4,1,5,6,2,3 Expected output: 1,2,3,4,5,6
1
vote
1answer
51 views

Get path of a file without it's name

The file song.mp3 is located in C:\x-folders\y-folder\z-folder\song.mp3 How can I store this path in a variable? C:\x-folders\y-folder\z-folder\ Thank you
0
votes
2answers
76 views

Filter files whose names contain a keyword in CMD

In working on a script that computes, and outputs to a file, the total cyclomatic complexities of a project under test, I am trying to filter out files whose names (including path) contains "test". (...
2
votes
1answer
11 views

Prefix filenames with several parent folder names in cmd

Challenge Expanding on this post, how can you prefix filenames to include their parent folder names. @dbenham response (see below) is great, but it only prefix' the immediate parent folder's name in ...
0
votes
0answers
7 views

Windows 10 wont boot HP probook 430 G2 2014 model

In powershell I tried the command "Shutdown" and my computer shut down then when I powered it back on I got a disk error 301 so I went to cmd and activated my boot partition and since then I have had ...
0
votes
0answers
24 views

Windows cmd script with start and output redirection

I have the same problem described here. However, all the provided solutions do not work for me. start cmd /c myscript.py arg1 arg2 ^> out.txt timeout /t 3 start cmd /c myscript.py arg1 arg2 2^> ...
1
vote
0answers
29 views

Windows - Powershell automatically moving files into the corresponding folders [closed]

I have a lot of files and folders. The filenames have the same name as the folders I have created for them. Here is an example from what I want to automate: Since there is a lot of PDF, MID and MSCZ ...
0
votes
1answer
32 views

Why file content is not remain after unmount a drive in linux?

I wrote a script on bashrc.cmd from my windows 10 to activate my virtual environment automatically. I pointed the path of bashrc.cmd into AutoRun according to this post. bashrc.cmd @echo off CD dev-...
1
vote
1answer
20 views

Set arbitrary text to windows clipboard

I'm using clip to set text on the clipboard. To do that, I use echo. echo Works|clip The problem is when the text contains special characters, eg. | ". echo (TRUE|FALSE)|clip echo " is a Quote Mark|...
1
vote
2answers
37 views

CMD command execution

I am trying to execute a specific command in a bat script after finding the path to the folder. Here is what I have so far: @ECHO OFF cmd /k "cd C:\"Program Files (x86)\"Microsoft Office\Office15\" ...
4
votes
1answer
93 views

How to keep the command line prompt on the first line of terminal?

I need to keep the command line on the top of the screen and see the output of any command below it. How can I achieve this using any available tools on any platform? Currently, on the all terminal ...
1
vote
1answer
35 views

How to move a specific file type found on the entire drive to another folder [duplicate]

So, I want to move all JPG files on the entire drive (Including other users) to a folder on the desktop. What's the command in CMD? The folder I want to move the files to is C:\Users\stefa_000\...
0
votes
0answers
39 views

How to loop through files named in a text file? Windows Server 2012

Windows Server 2012 cmd.exe box I need to make a batch file, call it get.bat, to process all directories listed in dlist.txt which is in the same dir as get.bat. Directory names are one per line in ...
-1
votes
1answer
35 views

Difference number of Commands in CMD (Windows OS vs RE)

A couple of days ago I noticed that in Windows Recovery Environment (at boot) there are some commands (bootrec for example) which are recognized when type in the CMD (Command Prompt) but are not ...
3
votes
1answer
35 views

How to get the full path to an executable which is invoked from one of the directories in %PATH%

Let's say I have an executable that I can invoke in Cmd.exe regardless of what directory I'm in because the executable's directory resides in one of the directories specified in %PATH%. So: C:\Users\...
0
votes
0answers
32 views

Focusing a window in cmd with Nircmd

First time posting. I have been playing around with creating macros that can individually adjust the sound of individual application. Found that Nircmd has the commands that I want for example if I ...
0
votes
1answer
33 views

Batch File to see if exe running correct file if not ouput value

I am looking to run a batch file to see if a program is running the file. The filename is the windowtitle. I am new at using batchfiles and figured in the command prompt I can run the following: ...
1
vote
1answer
26 views

save multiple chkdsk logs to single file

I am creating a batch file to run chkdsk on every drive and log the output to a single file. I am able to run a chkdsk and log it to a file with: chkdsk a: > %userprofile%\desktop\test.log ...