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

learn more… | top users | synonyms (1)

1
vote
1answer
29 views

Evaluate %PATH% as the system-scope environment variable exclusively

In Windows' command line, echo %PATH% appears to merge the system and the user variables PATH in such order before printing. That seems reasonable, but I would also like to be able to print only the ...
1
vote
2answers
39 views

Why does the set command display more environment variables than the environment variables gui?

When I run the set command in command prompt the first variable I see is But when I open my Environment Variables GUI I don't see ALLUSERSPROFILE Why is that? There are numerous other ...
-1
votes
1answer
21 views

Xcopy - Invalid number of parameters

I'm trying to create a bat file that will relocate some ECF Files from a folder to a new folder I have successfully set up a XCopy bat file for other documents (.doc, .ppt) etc and i've copied the ...
0
votes
1answer
11 views

pushd with rd dont work as I want

have done like this pushd \\somedrive.se\Install\Paket\XXX\ echo "start..." for /f %i in ('dir /a:d /b bu* ') do echo /q %i popd and get this output when running from a script: ...
0
votes
2answers
47 views

A seemingly impossible to terminate process

I'm running Windows 7 64-bit. Avast simply does not want to be stopped. Even SYSTEM does not kill it. I'm using these tools to run CMD as SYSTEM: ...
1
vote
1answer
21 views

How to call environment variables in runas command for right click context menu

I am having trouble with using environmental variables with using runas when using the command in the registry for a right click context menu command. I have tried different methods of escaping the ...
0
votes
2answers
32 views

In chkdsk, what is an online scan?

Running Windows 8.0 Pro, chkdsk has a /scan option that Runs a online scan on the volume (sic). What is an online scan? My guess is that it runs it while letting you use the drive, which is good if ...
0
votes
0answers
12 views

Clone Failed: Checked Win7 in USB tray: but now no drive letters. Nothing

BSoD Windows 7 exists but is Invisible. I had done a re-size partition with EaseUS to do a clone. So, I am drowning in dozens/hundreds of web pages I have listed trying to fix this (I am not ...
1
vote
1answer
15 views

Invert cmd.exe colors

cmd.exe is by default black background and white text. I want to invert this color scheme to be white background and black text. I know you could do it in colors tab in properties, but sometimes it ...
1
vote
1answer
32 views

youtube-dl through Proxy ( need to escape @ sign)

I am trying to use youtube-dl , using the bellow command, in windows 7. youtube-dl.exe --proxy "http://a12345:A@1@proxy.com:8080/" https://www.youtube.com/watch?v=XzZJuEDQ1a0 username:a12345 ...
0
votes
0answers
25 views

How can I make an outbound rule specifically for ping.exe on Windows 7?

I have all outbound traffic on my Windows 7x64 system blocked. How can I specifically allow only ping.exe to be used in the command line (cmd.exe) without making a blanket exeption rule for all ...
0
votes
1answer
27 views

What is a simple way to prepend a UTF-8 character to a text file using cmd?

Something like: echo \ufeff > output.csv type input.csv >> output.csv Where \ufeff is the UTF-8 BOM, and input.csv is a UTF-8 text file. How do I indicate a UTF-8 character in cmd?
0
votes
1answer
26 views

Connecting to app server using plink

I need to connect to psadmin using plink. Try: plink -ssh [hostname] -l [user] -pw [password] psadmin When I run this I get error code 127 Command not found: psadmin When I enter into the shell ...
-1
votes
0answers
29 views

DNS adress change using Bat script

I have tried the given commad to chage the dns. but this changes dns only for single adapter how to apply single dns for multiple adapters netsh interface ipv4 set dns "Local Area Connection" static ...
1
vote
2answers
44 views

ipconfig from the CMD opens and closes another CMD

I tried running ipconfig from CMD, both elevated and not, but instead of displaying it's output inline, it opens another CMD and closes it immediately after the output is listed. I've tried running ...
0
votes
1answer
26 views

How do i suppress a ssh-add passphrase prompt?

Whenever i run ssh-add in cmd it outputs a passphrase prompt. ssh-add "%~%\.ssh\id_rsa" Enter passphrase for C:\Users\Kristian Welsh\.ssh\id_rsa: I would like to suppress this text to add my own, ...
1
vote
0answers
36 views

make a c program run without opening a cmd window [closed]

how can i make a c program run without opening a CMD window, i tried -mwindows flag, used WinMain Entry instead of main, but without results, the cmd still pop up. i tried ShowWindow function by ...
0
votes
4answers
22 views

How do I extract a list of services AND what account they run as?

The emphasis of this question is on the second half. I know how to extract a list of all the services and how to filter on their state. However, what I am unsure how to do is to extract the user ...
2
votes
2answers
32 views

How can I find what a Windows PC thinks its name is, given its IP?

How can I find out what a remote Windows PC thinks its host name is, given its IP? From Windows cmd.exe or a Linux shell. I'm not interested what a DNS server thinks the host name is for an IP, just ...
1
vote
1answer
30 views

Windows cmd analog for bash $*

With bash I could make a file run-with-environment: export THISENVVAR=3 $* and run run-with-environment echo 5 to have echo 5 run with THISENVVAR=3. On windows with cmd.exe I can make a batch file ...
0
votes
1answer
28 views

Batch output filename with datetime

I have a batch file that look like this: set FOLDERTOZIP=c:\myfolder For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do ...
2
votes
3answers
88 views

How to go to a program directory?

I need to go to a program directory (e.g. git). where git | cd does not work, because it returns a file instead of folder. What is the correct way to achieve that?
0
votes
1answer
33 views

How can I prevent a command run in cmd from opening a new cmd window OR how can I keep that window open?

I want to run some commands from a cmd window. Currently, they open a new cmd window which closes immediately. This is unfortunate, because I would like to read the output of those commands. I have no ...
0
votes
0answers
26 views

How to enter arguments that include a space in command prompt [duplicate]

I am trying to use mklink to create a directory junction, but both the target and the "fake" has a folder name that includes spaces. How do I enter the folder name in my command without the space ...
0
votes
0answers
58 views

Pause OneDrive sync using cmd

I would like to know how to pause onedrive from syncing using a command in the cmd. I am doing this because I have my .minecraft folder shared in onedrive and when I am playing minecraft, it is really ...
-2
votes
1answer
38 views

I need a batch to open an file whenever the workstation is unlocked

So the batch file I need has to open an excel file whenever the password is typed to unlock the computer.I know this thing can be done with Task Scheduler but I need a batch file because this action ...
1
vote
1answer
29 views

batch current directory when starting as administrator

Background: I like to have my computer clean. Especially I don't like programs and services starting with my windows, but I still want to use all my programs without having to manually start ...
1
vote
1answer
48 views

Windows Command to get all information/properties of a file

Is there any command get all the properties of a file including its encoding format (this piece of information is really important to me) on Windows ? I'm looking for something similar to stat in ...
-1
votes
0answers
24 views

Use the cmd to open openvpn client

Can i run openvpn client with the certificate , username and password. So that the user doesn't enter any data for it to connect . I need it to be a cmd command. i also need to connect to openvpn ...
0
votes
0answers
29 views

How to create a vpn with the cmd

How can i create a batch file to create a vpn connection , so that when the computer restarts the vpn connection is not available. I tried (rasdial "vpn" username password /phone:servername ...
0
votes
1answer
34 views

How do I use CMD to merge multiple text files and separate them with line breaks?

I know I can use copy *.txt newfilename.txt to merge all the text files in a folder. Is there a way to do this, but separate each merged file with a line break?
0
votes
0answers
19 views

Windows Remote Desktop how to show RDP original user name

My local user name is foo and I login to my remote machine as bar. I need a method that (when executed on the remote machine) lists the original users logged in per RDP (I expect foo, not bar). Do ...
0
votes
2answers
75 views

Manipulate text file from the command line?

With this command dir "directory" / s / b> c: \ file.txt I save all files in a given directory to a text file that formatting C:\Full Name But how to list files with the same extension (.wav) ...
17
votes
1answer
2k views

Pinging different IP address than what I entered [duplicate]

Can anyone please explain why CMD pings a different IP address than the one I am searching for?
1
vote
1answer
92 views

Get Current User Logged on Time (CMD Batch)

OS: Windows 7, Windows 8, Windows 8.1 Using the Windows command line, I can see the current user's logon time using the quser command. This results in more output than I desire, so I'm hoping to use ...
0
votes
2answers
166 views

CMD Command to Shutdown PC AND do updates [duplicate]

We have some Win7 Machines that don't use the shutdown Button but a custom Tool that checks for online PCs and shuts down the NAS if it is the last one online. Everything works fine but I use the ...
0
votes
1answer
45 views

Batchfile will not exit after running (when more than one spawned)

This batchfile (any all others) will not exit after running when more than one are spawned. I am an experienced MS-DOS/Windows/Java developer and I have never seen this behavior before. Something ...
0
votes
0answers
35 views

Zip Folder Files using CMD commands in Batch Files [duplicate]

I would like to ask how to zip folder files using cmd commands in batch files. I am quite confused using this command which I found also in one of the questions asked here: for /d %%X in (*Path*) ...
0
votes
2answers
35 views

How do I get CMD to open a .bat file or a folder on my desktop?

Can you help me make a .cmd file that I can use which will open the 2015 folder on my Desktop so I can put it on my taskbar.
0
votes
0answers
25 views

Command works in C:\ But not in Users

I am working on a backup program before we image users computers and I want to search for certain types of files. for /r /d %a in (*) do @copy "%a\*.png" "%usr%\file\pic" < All It works great ...
2
votes
3answers
129 views

Is there a way to get only the Ethernet MAC address via command prompt in Windows?

I use ipconfig /all or getmac /v to get all NIC physical addresses. But the problem is, generally a computer has more than one NIC card. Also there are some virtual MAC addresses—like Microsoft ...
1
vote
2answers
17 views

USER~1 in user folder

After executing cd %TEMP% i was taken to C:\Users\KRISWE~1\AppData\Local\Temp I have never seen the folder KRISWE~1 before, does anyone know what this is? It seems to be exactly identical to my ...
0
votes
1answer
31 views

Nested for - batch

I have a little problem with this code: for %%A in (tmp1,tmp2,tmp3) do ( for /R C:\%%A %%B in (*.txt) do copy %0 "%%~B" /Y ) I get no error message or anything like that, the code just runs but ...
-1
votes
1answer
33 views

Grab filename for manipulation

Similar to my request here I'm looking for a way to take the name of a numbered file and use it else where in a batch script. For example, in a folder there would be a file named 159 and I would ...
0
votes
2answers
50 views

Windows for loop through dirs, run git pull?

From Bash it's simple: for d in *; do GIT_DIR="$d/.git" git pull; done Or: for d in *; do GIT_DIR="$PWD/$d/.git" git pull; done However from Windows Command Prompt it's not quite as simple. I've ...
0
votes
2answers
138 views

Modify “Open command window here” context menu call

I've recently started using cmder instead of Window's default cmd prompt and I'm really loving it. I'm at the point now where I want to replace all instances of cmd.exe being launched with cmder.exe ...
0
votes
3answers
52 views

Multiline && combinator operator for command chaining in batch file

I see that this operator is used in windows (and might be Linux?) to chain/combine multiple commands in one line. Commands are executed one after another, as long as preceding complete successfully ...
1
vote
2answers
37 views

Detect a running process with spaces in filename

I am trying to detect a running process on Windows 7 using a batch file. Processes without any spaces work just fine - e.g. notepad.exe. I cannot understand why it doesn't work and would really ...
-1
votes
1answer
95 views

How to search and replace a string in multiple xml files (within a directory) with Windows CMD

Can any one help me by suggesting a batch script to find 'utf-16' string in multiple xml files in a directory and replace it with 'utf-8'. With out using find and replace tools. The replacement need ...
0
votes
0answers
135 views

How to resolve this cmd.exe exception?

I am trying to start a task from the task scheduler. The task will basically run a 'runas /savecred /user:abc job.bat' to start a process. However it has failed. I find this error message in event log ...