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
2answers
112 views

How to I export filenames, filepath and properties of a directory tree to CSV?

I have a hard drive full of backups that I need to detail on a spreadsheet quickly and in the following specific way. I'm hoping there's an easy way to do what i need via some sort of .bat or .cmd ...
0
votes
2answers
44 views

How can I create a new .reg file from the CLI

I'd like to create a new .reg file and add it to the registry, as suggested in this article. REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\Autorun.inf] @="...
-1
votes
2answers
43 views

how to duplicate a folder and its subfolders in the same directory using cmd in Windows 10

I want to duplicate one folder with its subfolders in the same directory using the command prompt. But I am stuck as I cannot find a way to rename the duplicate folder. I have tried xcopy "TEMPLATE ...
0
votes
0answers
100 views

Windows 10: bat files not being run when double clicked

somethings has been changed in my win10 pro (Microsoft Windows [Version 10.0.17763.134]) box, and now I have issues with bat files: when I double click on them, I get a cmd, empty that shows up for a ...
0
votes
2answers
97 views

Windows cannot find .bat. Make sure you typed the name correctly, and then try again

I have no idea when this started to happen but it is preventing me from opening .bat files on double click. I am only able to run it as administrator. Is there anyway to fix this so i can double click ...
1
vote
0answers
88 views

How do you kill a tree using taskkill /T in CMD, but exclude some process in the tree? [closed]

I want to terminate explorer.exe's tree in a batch file and continue with its commands, but it seems to kill the batch file also. I was wondering if I can exclude the processes that CMD/ the batch ...
1
vote
1answer
41 views

Same cmd command returns different results for different users

I am typing this same command from two different accounts: query process <process name>.exe /server:<server name> From account A, it returns the list of processes on the server as ...
0
votes
2answers
40 views

cmd.exe launched from another cmd.exe

I'm doing a script that I start with bash.exe from Cygwin on Windows: C:\bash.exe my_script.sh It changes my Python Virtual Env depending of some conditions. For those who know Virtualenv, I need to ...
0
votes
1answer
35 views

How to shorten the displayed directory in the windows 7 cmd prompt [duplicate]

I know that the PROMPT command can be used to alter the command prompt but sometimes the directory path gets too long. Most of the time I'm not interested in the entire directory, just the last folder ...
2
votes
4answers
61 views

In Windows, add a prefix to multiple PDF files

I have a folder with 100 invoices & they all need to carry the prefix "INVOICE_" in front. I tried to run a command but it doesn't seem to be working. I've tried ren * INVOICE_*.PDF but it doesn't ...
2
votes
0answers
64 views

Terminating a Process from CMD: Softest to Hardest

I was wondering if anyone had experience using command line to terminate processes using taskkill and WIMC. I was wondering if anyone knew the order of how "hard" of a close/terminate these commands ...
0
votes
1answer
277 views

telnet connection failed on port 23 [closed]

i'm suppose to log into remote machines using telnet but in the task i have, there's no ip adresses for that ! instead i have hostnames. i'm a bit new in this and i don't know what i'm suppose to get. ...
1
vote
1answer
140 views

Is there a reason cipher /w fills up temporary files instead of writing to the raw disk?

The Windows command cipher /w can be used to securely wipe a hard drive's free space without the use of third-party tools or GUIs: cipher works by creating a folder called EFSTMPWP on the root of the ...
7
votes
1answer
185 views

How to wipe free space in Windows natively

Due to the nature of how filesystems like NTFS work, files that are deleted "permanently" from within Windows aren't immediately deleted - they're simply marked as deleted from the Master File Table (...
0
votes
0answers
22 views

is there a way to use a Bash/Powershell script to send hotkey commands to terminal

I have been working on a project and have gotten it to the point where I need to be able to send hot key macros to the terminal in order to invoke or stop a process. I have been using python up until ...
0
votes
1answer
73 views

plink - Password change required but no TTY available

I have 1000 servers to work with, but today all the server passwords expired.  I regularly use plink (PuTTY) to connect with 1000 servers.  Today I got error “Password change required but no TTY ...
2
votes
2answers
404 views

List all user accounts in a Windows Domain group via Command Line?

I would like to find\create a command to list all user accounts with all details on a Windows Domain Controller (Server 2012 R2) from a specified group. Using "net users" would be perfect, but I have ...
2
votes
0answers
41 views

Can I upgrade cmd.exe on Windows 8.1 to the Windows 10 version? [duplicate]

I work on a Windows 8.1 Enterprise PC. I Would like to upgrade my Command Line terminal (cmd.exe) to the one offered in the latest version of Windows 10, which has many handy features that the old one ...
0
votes
2answers
63 views

how to close and start a program from cmd in Windows XP?

I've been trying cmd commands such as "taskkill" on Windows XP and apparently they don't exist. I'd like to be able to close and open a program from the cmd because I need to connect to the Windows ...
0
votes
1answer
111 views

How can I remove the service and folder permanently?

takeown /f "C:\Program Files (x86)\AlibabaProtect sc delete AlibabaProtect I ran the above and killed "Alibaba PC Safe Service" via Task Manager. Then I ran the following: rmdir /s /q "C:\Program ...
0
votes
1answer
45 views

Assign aliases using FOR in Windows cmd.exe

I've been trying to use a loop to create multiple aliases without success. I'm not a professional, please bear with me... Does anyone know what's wrong in my code or how I can implement this in the ...
0
votes
0answers
108 views

Correct convert batch file from vlc command line

I am using VLC to transcode stream from enigma2 satellite Dreambox to be able to watch my channels over the Internet anywhere. If I set up VLC by GUI all is ok working. Because it is too much steps to ...
0
votes
0answers
36 views

What is causing these unwanted key presses from my keyboard?

I use this mini keyboard most of the time on my Windows PC. I'm usually gaming with a controller on the couch with my PC hooked up to the projector and a full-sized keyboard just gets in the way. It ...
0
votes
1answer
59 views

How do I check what a txt file contains, and if a fixed number of the last characters match a variable, then delete those who match?

I have a batch script that need to check what a textfile (.log or.txt) contains. When it's done checking, it needs to delete those lines that contain the same configuration of charachters that is ...
0
votes
3answers
57 views

How do I return from an awk script back to the command line?

I have a simple awk script, test1.awk: { x=temp; print x; } When I run it from the Command Prompt with: awk -v temp=hello -f test1.awk I get just a cursor.  I hit Enter, it writes “hello” ...
0
votes
1answer
88 views

How to remove a file named `con`? [duplicate]

I have a file named con.php. I tried to remove it through the Windows command line but it returns an error: Syntax for filename, directory name, or volume label is incorrect.
0
votes
0answers
35 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
16 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
1answer
48 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
37 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
48 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
26 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
14 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 '{...
-2
votes
1answer
96 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
38 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
65 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
20 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
38 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
64 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
98 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
111 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
551 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
131 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
32 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
82 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
308 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
87 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
29 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?