A command-line interface (or CLI) is a method of interacting with your OS or software by typing commands on your keyboard.

learn more… | top users | synonyms (3)

17
votes
5answers
7k views

Is there a Keyboard shortcut to close a Command Prompt window?

Is there any keyboard shortcut to close the Command Prompt window in Windows 7? Alt+F4 does not seem to work on a Command Prompt window. I close it right now by typing exit and Enter at the prompt. ...
12
votes
4answers
39k views

change directory command doesn't work in windows command prompt [duplicate]

Possible Duplicate: Using cd Command in Windows Command Line, Can’t Navigate to D:\ Somehow cd command is not working in windows command prompt when I want to change the drive. For ...
9
votes
2answers
2k views

How to open a PowerShell in the current folder?

This keyboard shortcut Shift + Menu, W, Enter opens the command prompt. Scott Hanselman points to an app that does the same for PowerShell and says it's builtin in Windows 7. The tool doesn't seem to ...
9
votes
2answers
53k views

Batch file that runs cmd.exe, a command, and then stays open at prompt

I would like to make a batch file that: Opens cmd.exe Within that Command Prompt runs net use to display mapped share paths Leaves the window open so that I can run additional commands if I wish to ...
7
votes
6answers
8k views

Automatically executing commands when a command-prompt is opened

I am looking for a way to execute some console commands automatically when a command-prompt is opened in Windows, specifically to set some command aliases. For example, when a command-prompt is ...
7
votes
3answers
4k views

How can I record sound from the windows command line?

Is there an application capable of recording sound that I can run from the command line on XP? Ideally I'd start it with one command and stop it with another. Or I could specify a duration with the ...
6
votes
2answers
8k views

Is there a ln symlink command in Windows 7 [duplicate]

Possible Duplicate: Does window have the ln -s or equivalent? Is there an equivalent ln command to create symlinks in Windows?
2
votes
4answers
24k views

Remove a user's password using “net” command'

is it possible to remove a user's password using the net command? I tried "net user <name> *" and just hitting return twice, but this does not work as expected. Is there any other way to do ...
1
vote
8answers
6k views

How do I rename a bunch of files in the Command Prompt?

I have a problem with filenames. The stupid camera I am using resets the autonumber sequence every so often, and therefore I am getting tons of conflicts if I try and put lots of photos in a single ...
12
votes
3answers
30k views

Restart a Windows service from the command line

Is there a way to restart a Windows service from the command prompt?
9
votes
8answers
30k views

bash: how to pass command line arguments containing special characters

I've written myself a linux program program that needs a regular expression as input. I want to call the program in the bash shell and pass that regular expression as a command line argument to the ...
9
votes
4answers
16k views

How can I count the number of folders in a drive using Linux?

I need to organise an external HDD such that there is no more than 500 folders on it. Ubuntu's "Properties" pane shows only the file count, not the folder count. Is there a simple command line that ...
8
votes
8answers
28k views

How to get my external IP address (over NAT) from the Windows command-line?

The Windows "ipconfig" command can only show me the parameters from the Ethernet interfaces from my machine (even with the ipconfig /all argument). It can show detailed information about the ...
8
votes
3answers
10k views

Windows 7 equivalent for ntrights.exe

What is an equivalent for ntrights.exe on Windows 7? I need it to be able to be run from the command line.
8
votes
1answer
6k views

Possible values of %PROCESSOR_ARCHITECTURE%

I'm writing a batch script for windows 7 and want to handle both 64 bit and and x86 processors. What are the possible values of the Windows %PROCESSOR_ARCHITECTURE% environment variable?
8
votes
1answer
712 views

How to customise ALL console windows

Every time I start using a new conmsole application, I have to set my font to Consolas (FTW!), colours, console and window size for that application (Save settings for all windows with this title, or ...
7
votes
3answers
7k views

adding PATH with SETX or PATHMAN or something else?

I am trying to add a PATH from command line, as with SETX %PATH%... it always expands the PATH, which I don't want. PATHMAN is exactly for this purpose, but it doesn't work for me on Windows 7. It ...
6
votes
3answers
23k views

How do I change automatic logon via Script or Command Line?

After deploying a Windows 7 image to Stand alone machines we run into the following problem. If we set autologon to off then we have to log in manually and activate Windows and Office - the Keys ...
4
votes
2answers
2k views

How to update the PATH user environment variable from command-line

I have a system PATH variable with the system level config. I use the user PATH variable to complement the PATH with user-specific config. I would like to update the user PATH variable from ...
4
votes
4answers
7k views

How to check the count of .txt files in a folder (dir command)?

How can use dir command to check how many .txt files there are in a folder (for example, C:\Temp\)?
4
votes
4answers
21k views

7-Zip CMD: Add current date to archive and include only the last modified folder in archive

I'm trying to create a backup script with 7-Zip. I have everything else done already, but these two issues are still blocking me. Firstly, I want to add a timestamp with a create date like this: ...
3
votes
2answers
300 views

Alias Command for Windows

While at work, I want to use the CLI to be more productive on my Windows machine. What command, in Windows, would be a replacement for the alias command?
3
votes
4answers
2k views

Where is the Official list of Windows Environment Variables?

I'm working on some .bat stuff created in a legacy application, which uses many environment variables. I need to know exactly what is every one of them (%windir%, %os%, etc.). So I need the official ...
3
votes
2answers
683 views

How can I create keyboard shortcuts to run commands in a terminal?

I was wondering is it possible to bind say F5 to output sudo apt-get update so I can press one key to write this into the terminal?
3
votes
3answers
10k views

Command-line OCR in Windows 7

What are some command-line OCR utilities that will work in Windows 7 64-bit?
2
votes
2answers
10k views

How do I recover from “repair pending” error in SFC?

I am trying to fix an issue with Windows registry and services. I tried running sfc command but this is the error message I get? C:\Windows>sfc /scannow Beginning system scan. This process will ...
2
votes
2answers
6k views

How to delete files and subdirectories from folder but not that folder itself?

What commands can I use (from the command prompt) to delete all files and all subdirectories from a folder, but not delete the folder itself? Basically at the end of the delete, there should be an ...
2
votes
2answers
9k views

How to find my VPN client IP in windows

When I run ipconfig and I get the following: C:\Documents and Settings\grmsrh14>ipconfig Windows IP Configuration Ethernet adapter Wireless Network Connection: Media State . . . . . . . ...
2
votes
3answers
15k views

Windows 7: Transparent command window? [duplicate]

Possible Duplicate: Transparent Command Prompt in Vista? Linux and other *nix based operating systems usually have an option for transparent command window displays. Is there a way to get ...
13
votes
5answers
24k 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 a " you do not have sufficient privilege to perform this operation" message. I used the same ...
9
votes
5answers
2k views

How can I still see the 'man' text after I quit man?

I typically use tcsh or bash and often want to use 'man' to review a command's options. Currently when I quit man or ctrl-C, the man text disappears and I see the scrollback buffer that was there ...
8
votes
5answers
4k views

Moving hidden files/folders with the command-line or batch-file

Question Does anyone know of a way to move files and folders that have the hidden, system, or read-only attribute set from the command-line or a batch file? (No, stripping the attributes first is not ...
8
votes
4answers
2k views

Why am I able to execute a program that is not in my PATH environment variable?

I was wondering why the command java -version is globally accessible? I could run it from any directory and its working: How does it work? This is what my system PATH variable looks like: ...
7
votes
3answers
14k views

How to install Uniconverter (command-line app) on Mac OS 10.7.2 (Lion)?

Uniconverter is a command-line tool that shares code with the sK1 Project. it's used to convert from one type of vector graphic file to another like this: uniconverter before.eps after.svg I'm ...
7
votes
3answers
10k views

Shortcut to command prompt pointing to specific folder

How can I create a desktop shortcut that opens up Command Prompt (cmd) in a specific folder? I'm getting tired of navigating from my home directory to my development directories.
7
votes
2answers
2k views

What is causing all these “declare -x …” lines when I open a terminal?

When I open a terminal on my Fedora machine (or ssh into it), I get a bunch of lines like this before the prompt: declare -x CVS_RSH="ssh" declare -x DISPLAY="localhost:10.0" declare -x ...
6
votes
2answers
9k views

Enable/disable Windows 7 device via command line

I have a device that I often enable and disable using the Device Manager. I'd like to write a script to do this programmatically (that is, using the command line). I saw a program called devcon that ...
6
votes
2answers
4k views

OS X `say` command for Windows

The say command is perhaps OS X terminal's most compelling feature - it takes text as input and speaks it through the computer's speakers. Is there any equivalent command-line tool on Windows, either ...
6
votes
4answers
35k views

Command-line FTP function does not work

I am using Windows 7 and have multiple FTP client applications working without any problem. However when I use command-line FTP, I can get connected, log in (after entering user name and password) ...
6
votes
1answer
2k views

How can I print a textfile on the command prompt in Windows?

How can I print the content of a textfile on the command prompt in Windows? In Linux I can do this with less textfile.txt, more textfile.txt or cat textfile.txt What is the command for this in ...
4
votes
1answer
643 views

How to run internal cmd command from the msys shell?

The Windows CMD utility has a number of internal commands, such as mklink. How can they be used from the msys shell ? From CMD's documentation, the /c switch can be used to execute a command and ...
4
votes
3answers
2k views

How to send a Skype message from the Windows command line?

I would like to send a message to group chat from the Windows command line. I know the chat name from skype, lets say it is 'TestChat'. What is the easiest way to do that?
4
votes
6answers
14k views

Command line app 'not recognized as internal or external command.'

A few years back I made a couple of console command line apps which at the time worked with no issues. I'd place them in the window/system32 directory and be able to use them from the console prompt ...
4
votes
1answer
4k views

Rename multiple files as “Modified Date/Time” using cmd or Powershell

I have hundreds of JPG files in a folder. I want to rename each file so that the file name is replaced with "Modified Date/Time" of that file, namely DD.MM.RRRR.HH.MM.jpg. For example, Before ...
4
votes
1answer
1k views

Put 'nix box to sleep from command line?

What command(s) do I type in the terminal to put the computer to sleep?
4
votes
3answers
11k views

Configuring Wi-Fi in WIndows XP from Command line?

Sometimes it doesn't connect (especially to an ad-hoc network) unless I press rescan button. How to control Wi-Fi connectivity in Windows XP from command line? (There's no 802.11-related things in ...
4
votes
2answers
4k views

Change to default start folder for Windows XP command prompt

My new work computer's command prompt automatically brings up "H:\>" when I open it. Is there a way for me to change that safely? Specifically, to "C:\foo\bar\Something Else"? I found the method ...
4
votes
6answers
2k views

Dos and/or Windows versions of Unix SCRIPT command

Back in university, when we had to submit an assignment in CS, we would have to perform a series of steps including running script, date, whoami, etc., and then running our program. The script ...
3
votes
2answers
2k views

How do I close an OS X application from the command line using a alias defined in my .bash_profile?

I found the following shell script that can be used to tell an OS X application to quit: #!/bin/sh echo | osascript <<EOF tell application "$*" quit end tell EOF I have several simple ...
2
votes
2answers
4k views

Batch file to run multiple programs with delays [closed]

Well i am new to Batch things, so need some help. I understand the lowest level, but with more complicated things have problems. Thing that i need now is File that launches other files, but with ...