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)

9
votes
2answers
2k views

Is there a command line audio converter/tool a la ImageMagick?

ImageMagick is a handy, powerful command-line tool that can crop, scale, rotate, change format, apply basic (and some not-so-basic) effects to pretty much all sorts of images. Does something like it ...
2
votes
3answers
10k views

Command line option to open program as administrator in Windows 7

If I want to open Notepad and edit the hosts file, I have to invoke the Start menu, find the Notepad shortcut, right click and run as administrator, then open the hosts file in Notepad in order to ...
29
votes
10answers
55k views

On Windows 7, is there a command prompt line that can start cmd as an administrator? [duplicate]

On Linux, we can use sudo bash to run a shell as the superuser. On Windows 7, we can use Start menu -> (in search box, type) cmd -> Right click on search result and choose Run as Administrator ...
5
votes
2answers
24k views

How to run cmd with Admin privileges using command line

Is there a way to run/start cmd as administrator through the command line or a batch file programming in Windows 8? I want to create a batch file which has administrative privileges without any ...
2
votes
1answer
85 views

Batch command to archive folders with content using WinRaR

I have lot of folders in the root "C:\Test\Archiv\" (more than 1000). To be more specific, I get one every hour. They are named as following : ay %year% m %month% d %day% h%hour% In each folders are ...
1
vote
3answers
53 views

How to use grep or awk to save every line from text file as new file?

I am a scripting beginner. What i am trying to do. I have a text file that looks like this (example): hello hi there apple I am trying to make a script that saves every line as a separate new file ...
0
votes
3answers
31 views

How do I delete a part of a file name for a batch of files in Windows 8.1?

I have lots of files in a folder but they all start with a line of numbers and are separated from the actual file name by a "_" For example: 123123123_filename.txt 456456456_filename2.txt ...
-1
votes
0answers
13 views

Splitting large audio file with many different timed outputs (ffmpeg)

I downloaded a full album off of youtube and have all the time codes, but how do I tell ffmpeg to create files based on that info?
4
votes
3answers
471 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 ...
0
votes
4answers
54 views

How can I count the line breaks in a folder recursively?

I'd like to learn a native command line method of counting lines of code in any project saved on Windows. That way, no matter where I'm working or what language / IDE I'm working with, knowing how ...
0
votes
3answers
2k views

Possible to continue runas /u:domain\admin cmd with followup commands in the new CMD window?

Is it possible to continue runas /u:domain\admin command with followup commands in a new CMD.EXE window? I tried this but it didn't work: Runas different user to launch CMD and run command What I ...
18
votes
2answers
13k views

How to create batch file that delete all the folders named `bin` or `obj` recursively?

I have the need of deleting all bin & obj folders in a folder on my PC. So, I'm thinking of a batch file to do that but I'm not famaliar with batching file in Windows. Please help. [Edit] After ...
1
vote
3answers
7k views

concatenating string in FOR loop in batch file

I have a file sfsview_monitor1.txt with the following content: Total pages: 16320 Pages used: 142 Pages free: 16178 I want the output like this: 16320 142 16178 with the following code I am not ...
1
vote
1answer
22 views

rar - command line switch for exclude compress but store?

Assuming I have few files like : --- +Royi | +---1.txt +---2.txt +---3.Avi +---4.mp4 +---5.docx looking at : rar a -r -m1 Royi myArchive.rar This will shrink all ...
0
votes
1answer
32 views

How to delete the profile AD attribute using dsmod or similar?

As part of a user management batch script, I need to delete the profile value from an AD User object. The syntax I'm using is as follows: dsquery user -name TEST | dsmod user -profile "" It ...
24
votes
4answers
15k views
0
votes
3answers
36 views

Count files in a folder and subfolders from the command line

How do I count all files of a given type (eg. *.mp3) in a designated folder (and optionally subfolders) from command line into a environment variable? (no PowerShell please, just batch commands)
14
votes
5answers
3k views

How do I paste into the Windows CMD prompt by using only the keyboard?

My current technique is to right-click in the command prompt and then click paste. This bugs me - is there a better way?
0
votes
1answer
174 views

did cmd change in Windows 7, how to undo?

Windows 7 was not allowing me to add a new folder within folders. So I made the command prompt change using the icacls command below. This includes 'desktop', which included all the shortcut icons. ...
0
votes
1answer
63 views

How to change the color of the default title in iTerm2

Every time I execute a command, it's difficult for me to find where is the start point of the results comes from my last command. So I want to make the default line "Arthur-Mac-mini..." change color, ...
0
votes
2answers
98 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) ...
0
votes
1answer
28 views

Add addtional test for files

What would I need to add, to also ignore file names containing AppData with .exe extensions? I am using this in an SetupComplete.cmd for unattended Windows setup, and have AppDataLocal.exe and ...
1
vote
1answer
49 views

Is there a command in which we can see list of shared directories and with whom they are shared for windows 7?

Is there a command in which we can see list of shared directories and with whom they are shared for Windows 7? I have tried the below commands: net share wmic share get caption,name,path But I ...
1
vote
2answers
269 views

How to execute remote command using PuTTY over Telnet

I was created a .bat file to run PuTTY and it successfully runs. The problem now is, the command line I was key in were not executed, any solution for this? My .bat command is: putty -telnet -P ...
0
votes
3answers
251 views

Keep PuTTY inside command line

Is it possible to run a PuTTY session within cmd.exe, without using the PuTTY console? Kind of the opposite of this question: Is it possible to use putty as the UI for the Windows shell?
10
votes
4answers
23k views

Windows 7 - Open the Volume Control popup from the command prompt

I would like to open the Volume Control popup directly without using the mouse or keyboard. Currently, I am using AutoHotkey to press Win+B to focus on the system tray, Left to highlight the Volume ...
3
votes
4answers
21k 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 ...
1
vote
1answer
63 views

Can't find the good Cygwin shell executable

I am working on Windows 7 and I need Cygwin for my project. I am trying to launch the Cygwin terminal from a Java programm and then write command lines but my problem is that I can't find the right ...
12
votes
6answers
14k views

What does “sudo -s” actually do?

I am using ubuntu 10.04. I notice that after I run "sudo -s" in terminal, the prompt changed from "XXX@XXX" to "root@XXX", seems it changed to root privilege. But when I check the ...
1
vote
2answers
34 views

How do I interactively type \r\n-terminated query in netcat?

$ nc example.com 80 GET / HTTP/1.1 Host: example.com HTTP/1.1 200 OK ... It works, line separator is just 0A here instead of required 0D0A. How do I type a 0D0A-separated query in netcat? It is ...
1
vote
1answer
50 views

How do I select a random file in a folder?

I am trying to select a random file of a specific type like *.mp4 from a folder (and optionally subfolders) using the Windows command line batch script (no PowerShell) The file full path should be ...
0
votes
1answer
18 views

cmd-f freezes the program and has unexpected inputs in mac os X

I have a mac os X. After certain point, cmd-f is taking a very long time in every programs. The program freezes so that I have to eventually force quit the program I tried cmd-f. Another cue is that I ...
1
vote
1answer
11k views

How to mount a Windows share in OpenDreambox via Telnet?

I have created a new folder on root of C disk called recordings and I have shared it with everyone. I now want to mount this folder on my Dreambox so that I can record to it. But since this is an ...
-2
votes
1answer
18 views

Any other useful 3rd party command line utilities such has SendEmail.exe? [closed]

I'm looking for other useful tools like SendEmail.exe to use in my batch files. Such as ones that I can call form a batch file that can do something you normally couldn't do from batch. For example, ...
1
vote
3answers
790 views

Is there a console command to switch the left and right mouse buttons?

My friend has a Mac mouse on a windows. When he clicks the mouse, its a right-click because the settings are reversed. Is there a console command to switch it back? Seeing as he can't fix it with ...
1
vote
2answers
313 views

Winrar command line zip folder

I am trying to use WinRAR command line to zip folder: "c:\Program Files\WinRAR\WinRAR.exe" a -afzip "e:\output.zip" "e:\foldertozip\" If the foldertozip contains file, the command line works. But ...
0
votes
1answer
158 views

PowerShell script to decrypt file

Can some one help me with this command to decrypt files using powershell? echo YOURpassPHRASE | gpg --keyring "C:\directory\filepath" --secret-keyring "C:\directory\filepath" --batch --yes ...
-1
votes
1answer
12 views

ENV Variable not working - Windows 8

Trying to add an environment variable called phantomjs to my PATH: ECHO %PATH%: ...;C:\foo\phantomjs.exe but when I run where phantomjs, I get INFO: Could not find files for the given ...
12
votes
6answers
28k 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 ...
1
vote
3answers
3k views

Copying a directory by retaining its permission

I've located this KB article which explains the topic title. But what my problem is that when I use "xcopy" command; it only copies the contents inside a directory to the new location but not the ...
1
vote
3answers
4k views

Color in Cygwin terminal

I've installed cygwin because I'm a bit fed up with the Windows terminal not being great. The only problem I'm having is the lack of colours. You can see the problem in the following 2 screenshots ...
1
vote
2answers
50 views

Concatenate multiple tar files in one command

I receive anywhere from 4 to 100 very large tar (~20GB) archive files everyday. I have been concatenating them in the past by looping through each of the archives I see on the file system and doing ...
0
votes
1answer
18 views

Hashutils to recurse the whole drive

Following this post another super user question, I downloaded hashutils. Works great with with the -r flag to recurse a folder. However, I am unable to recurse a whole drive. Trying this command, the ...
0
votes
1answer
2k views

Log into hidden administrator account with standard user

I created an administrator user account (jeff) and then downgraded an existing account (jen) to a standard user. All was good I accomplished my goal except I didn't want the admin account to show on ...
0
votes
1answer
72 views

DNS problems from command prompt

I can't get a network connection when using the command line for some reason, even though it used to work. I think it's a DNS problem because I can ping 8.8.8.8 but not google-public-dns-a.google.com: ...
0
votes
2answers
59 views

Confirmation prompt for chmod, chown

I'm just trying to add a confirmation prompt to a few linux commands like chmod and chown. I've tried to google this but I can't find much information on the topic. While searching I found out ...
1
vote
1answer
29 views

Can I display specific part of Output from Command Prompt in Windows?

If I run netsh wlan show hostednetwork it will display, Hosted network settings, Hosted network status these two parts. But, if I want to display just the "Hosted network status" ...
-2
votes
1answer
48 views

Command line switches for Netop Remote Control version 9.0 (NGstw32.exe)

Would anyone by any chance have the command line switches for Netop Remote Control version 9.0 (NGstw32.exe)? I've contacted Netop support but they no longer support this version, and I can't update ...
0
votes
3answers
53 views

How to access folder path from first input parameter and how to call IF Loop in batch file?

@Echo OFF SET FilePath=%1 SET HeaderFilePath=%2 SET RetrunCode="0" Call :sub %FilePath% exit /b :sub SET FileName=%~n1 SET FilePath=%1 SET "FileType=.zip" CALL SET ...
10
votes
2answers
3k views

Bash: Replace all occurrences of a word in the last command

Almost by mistake, I figured out you could do something like: $ cp foo.data bar1.data $ ^bar1^bar2 And that runs the same command with bar2.data instead of bar1.data. Now, how about if I have ...