Skip to main content

All Questions

Tagged with
50 votes
8 answers
66k views

Is there any way to get the windows cmd shell to expand wildcard paths?

Occasionally, the cmd shell's inability to expand wildcard paths can really be an inconvenience. I had to pass 100 files in a directory to a program, and couldn't type *.ext. Instead, I used mingw's '...
1 vote
2 answers
2k views

How do I enable system protection from the command prompt in the system repair screen? [duplicate]

I had disabled system protection trying to download DirectX 10, because my graphics can't support DirectX 11. Some Windows updates started after I turned off my computer, I figured it wouldn't be a ...
15 votes
4 answers
41k views

Change what closing the lid does, from the commandline?

I wonder if anybody knows a utility, or command, which can change this setting in windows in one click. I often need to change it on my laptop whether I want it to do nothing when the lid is closed or ...
4 votes
2 answers
6k views

Equivalent of `$@` for windows shell

I use batch files to create wrappers around some commands which need extra argument to work. For example, I have a file pip.cmd which adds a custom proxy argument to all pip calls: pip.exe --proxy="...
7 votes
3 answers
22k views

How to autocomplete filename in your path on the command line when in a different directory in windows7

on the windows command line I can autocomplete any filename/subdirectory by typing a few letters and then pressing Tab. Is there a way to extend this to anything that is in my PATH. Example: In my ...
4 votes
1 answer
8k views

What does `/n "%1" /o "%u"` mean?

I ran the ftype command in CMD, and got the following output: "C:\Program Files (x86)\Microsoft Office\Office15\WINWORD.EXE" /n "%1" /o "%u" I've seen %1 before as the place holder for the file name ...
2 votes
1 answer
16k views

How do you use gpg4win from command line to encrypt or decrypt a file?

I have Windows 7. (Not Windows 10 so I don't have the fancy native "Windows Services for Unix" that Windows 10 apparently has) How do you use gpg4win from command line to encrypt or decrypt ...
1 vote
2 answers
2k views

Adding a sub folder to multiple directories where the name of the directories contains punctuation

I would like to create the same sub-directory in each directory of a folder. I found the answer here: Add a new folder to each subfolder The command prompt was: FOR /d %A IN (e:\donuts\*) DO mkdir "...
38 votes
1 answer
118k views

Importing .PEM certificates on Windows 7 on the command line

I need to import a PEM certificate on a massive number of freshly installed Windows 7 Enterprise machines. Normally, I would do it through MMC → Certificates (Local Computer) snap-in → Trusted Root ...
114 votes
14 answers
259k views

How can I always run the command prompt as administrator?

As a developer, I often have the need to open a command prompt for various purposes. For example, I use iisreset to restart my local web server. I typically open the command window in one of two ways:...
8 votes
7 answers
69k views

How can I copy a print file to a networked printer?

I have an Epson TM-T88V network printer. I can print to it using the printer driver. But I need to copy a "print file" to the printer using the command line, and this causes problems. I ...
4 votes
2 answers
11k views

Open a URL file in a new tab of existing IE window from command line

When IE10 is set as my default browser, double-clicking an internet shortcut (*.url file) opens it in a new tab of the existing IE window. However, when it is not the default, every way of opening a *....
0 votes
2 answers
84 views

Run this line by line, or as a whole

I am trying to install flask. Docs say to make an environment: Create an environment Create a project folder and a venv folder within: Windows mkdir myproject cd myproject py -3 -m venv venv How ...
38 votes
9 answers
29k views

How to toggle Show/Hide hidden files in Windows through command line?

I often need to toggle between show/hide hidden files in my PC. I have been doing it the usual way, Click Organize in an Explorer window. Select Folder and search options. Switch to View tab. Toggle ...
20 votes
8 answers
100k views

How to disable the command prompt's auto-close upon completion?

I know there were some tricks with older versions of windows to accomplish this, but not sure on windows 7. If I had a piece of software that executes a command with switches resulting in a cmd.exe ...
2 votes
2 answers
12k views

Trouble using command prompt to mount a network drive

When I tried to mount the drive with the following command: net use x:\\folder\Sharename I get the following error: "System error 67 has occurred the network name cannot be found" When I ...
35 votes
7 answers
37k views

Cygwin from Windows is very slow/ laggy

Suddenly all Cygwin commands I start from the Windows command line have a ~10-20 second lag before they execute, so that Cygwin becomes totally unusable. I already tried to reinstall without success. ...
1 vote
2 answers
5k views

Can't delete shortcut from CMD

I can't delete shortcut file from CMD, saying file doesn't exist. But if I open Desktop it exists and I can delete it. I tried to copy and I saw something strange, If i copy it to same place, created ...
26 votes
5 answers
63k views

Where are the standard Windows prompt commands files?

If I type dir in the command line, I guess it executes a dir.exe hidden somewhere in the system. Is there such a file? Where is it?
3 votes
2 answers
14k views

How to install CertUtil to Windows 7?

It seems that my version of Windows 7 (SP1, with PowerShell 4) lacks the certutil command. I tried to look for a way to add it manually but failed. Any ideas on how to do it? UPDATE Thanks to comments,...
0 votes
1 answer
45 views

My windows 7 downloads files with appended lines

I have a windows 7 on my old laptop which don't support newer OS so i keep that as a test machine for various codes. Most of the times I use wget for transferring files from my new laptop to the old ...
6 votes
3 answers
9k views

How do I add "edit" or "open with" to the context menu for .bat files in Windows Explorer in Windows 7?

I've tried this by mucking around with "Set Associations", but all I've accomplished there is messing up the default Open action. I've also found a bunch of registry scripts attached to random forum ...
2 votes
2 answers
4k views

Why doesn't "call" work in a Windows 7 batch file?

I have a .bat file which contains call "c:\my path\myprog.exe" but the command prompt says that call isn't a command.
9 votes
2 answers
16k views

Get the complete command line of a process [duplicate]

I can run taskmgr, Display, add column, select "command line", and I will see the complete command line of a process. For what I check, this command line is quite long, and I can write it out (CTRL-C ...
0 votes
1 answer
3k views

How to install .inf file in windows 7 using cmd

Hello i had installed windows 7 on my Dell Latitude E6410. I am using Driver Easy to download missing drivers. All drivers I have downloaded but they are in .inf file. I have used device manager to ...
18 votes
4 answers
36k views

What is the command line for Indexing Options?

What is the command line for Indexing Options? I very much enjoyed reading all five pages of Useful Commandline Commands on Windows. But I still cannot find the console command for Indexing Options. ...
5 votes
2 answers
43k views

How do you set and call a path variable in command prompt?

What I have to do currently: cd C:\Program Files (x86)\MyProgram\modules\bin What I'd like to do: set dir as %Path% cd %Path% Is there a quick way to do this from the command prompt? Also, would I ...
5 votes
4 answers
14k views

How to remove embedded album covers from mp3 files via commandline

I want to remove the embedded album cover from mp3 files using only Windows command line. What I've tried Tried ExifTool: Unfortunately the tool can only read (not write) mp3 tags as the author ...
0 votes
1 answer
3k views

Error 703 with rasdial pbk file

I need to make a VPN connection using pbk file and login / password silently without any dialogs. Just like run script - connected. Also user should not create a connection manually, everything should ...
-2 votes
1 answer
598 views

How can I have a .bat run on startup in the background [closed]

How can I have a .bat file run on startup in the background on a windows computer? Also I'm not the admin, so I have to do it without admin priveleges. Its an old computer I bought at a garage sale.
6 votes
4 answers
10k views

Command to open windows explorer window with filtered results?

Is there any way to open a windows explorer window with the contents already filtered as if you'd entered them into the search window in the corner? So I'd like to type directly into the Start Menu ...
18 votes
3 answers
169k views

How to run .js file from a command line on windows?

I have a shortcut with 'target' "C:\Users\Public\TestPro\TestPro Automation Framework\taf.js". I want to run that from a batch file so I copied the "C:\Users\Public\TestPro\TestPro Automation ...
0 votes
1 answer
605 views

Windows command-line installers used by some programs: problems showing syntax and parameters

As time goes by, it is (fortunately) more usual to find command-line installers for most Windows GUI programs, so you can make batch and offline console installations. But sometimes I have found a ...
1 vote
1 answer
15k views

CMD set variable to be result of a command

I would like to run a command to set a computers description. I found that to get the model i can do wmic computersystem get model I am wondering how can i set the result of that line to be a ...
10 votes
1 answer
44k views

Windows7 command: set http_proxy and bypass

I am sitting behind a company proxy. To start vagrant i had to use set HTTP_proxy=http://http-proxy.example.org:9999 i tryed using netsh winhttp but that didn't work. So now my command line uses the ...
10 votes
3 answers
61k views

What is the Windows 7 command-line to remove all remember passwords in Credential Manager?

We can remove remembered/cached passwords via Credential Manager as here and via a command cmdkey as here. I want to have one command that quickly clear all the passwords. How can we do that?
1 vote
1 answer
18k views

Move all files within subfolders to parent folder

Firstly, I'm aware there are tons of similar questions, and I know because I must have tried adapting at least 5 of them, but I'm still here asking because my crappy grasp of CMD (which I actually ...
2 votes
2 answers
2k views

Unable to change default program to open a file from cmd

Once I thought, what can happen if I open the CPP file with cmd. I thought it will work similar to the type command in cmd, but when I understand it isn't, I wanted to change the default program from ...
1 vote
2 answers
12k views

How do I create seperate 7z files from each selected directory with 7zip command line?

FOR %i IN (*.*) DO 7z.exe a "%~ni.7z" "%i" Does the job for each selected file. However I've got tons of directories (with files inside them obviously) I need to pack. Say I have d:\dir1, d:\dir2, ...
2 votes
3 answers
9k views

How to properly quit from a Remote-Desktop Session? tsdiscon now logs the local user with priority

I have been using the command tsdiscon happily for disconnecting from a remote desktop connection. I have made a "bat-file" with this line, and have assigned a shortcut to this function. Now, I have ...
0 votes
1 answer
2k views

Cannot delete file that "does not exist" according to Windows-7

Somehow a file ended up on the personal desktop of my Windows 7 machine that does not actually exist. I recognize the title as part of a Reddit post, but I don't know how it ended up on my desktop. ...
49 votes
9 answers
125k views

Got not sufficient privileges message in CMD when logged on as administrator

I was trying to use mklink command in cmd (I have Windows 7 OS) I was logged on as administrator, but I got: You do not have sufficient privilege to perform this operation. I used the same command ...
21 votes
9 answers
126k views

Change Display Arrangement via Batch/Command Line on Windows 7

I want to change the Display Arrangement of my computer via Command line. I have 2 monitors set up, extending, and I want to change the monitors setup from Dual Display to Single Display and back via ...
3 votes
2 answers
14k views

Powershell A Drive C Does Not Exist

I am using a regular system, nothing virtual, my C drive is not mapped which I see in some forums. Environment path not set? I started a tutorial to learn Powershell, and the first thing I tried to ...
10 votes
7 answers
6k views

Can I add a Windows Explorer context menu option to start command prompt in the selected directory?

When browsing in Windows Explorer, sometimes I want to start a command prompt "here", e.g. with the current browsed folder as the current directory. For example, when I am browsing "D:\Foo\Bar\Bar1", ...
1 vote
1 answer
159 views

I Froze My Computer’s Clock With CMD And I Can’t Unfreeze It

So I wrote the following cmd file: :he time < time.txt goto he The contents of time.txt are: 00:00:00.00 My goal here was to freeze my Windows 7 clock to see if it caused a program on my computer ...
2 votes
1 answer
225 views

Why is my cmd.exe in windows 7, opening with Administrative privileges?

Why is my cmd.exe in windows 7, opening with Administrative privileges. (I won't say Running "as Administrator" 'cos i'm aware that Win7 "Run As Administrator" option, runs it with ...
3 votes
6 answers
66k views

Commands not working in Windows 7 32-bit command prompt

I have an HP laptop with a Windows 7 32-bit Home Premium operating system. My command prompt doesn't run lots of commands like help, shutdown, ipconfig, ping, etc. I get a message like: 'help' is ...
0 votes
1 answer
5k views

How to format CDROM using Windows 7 from the command prompt

I'm currently using Windows 7 to create multiple copies of CDROM using a batch file. I could automate the copying of files but I'm not able to find out how to format the CDROM from the command prompt....
0 votes
2 answers
14k views

%%f in a batch file with Windows 7 Professional 64 bit

I have a line like the following in a several batch files: FOR %%f IN (%*) DO something.exe %%f I've used them for a long time with no problem. I recently had to replace my hard drive and had ...

15 30 50 per page
1 2
3
4 5
22