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)

0
votes
2answers
46 views

Using another program through Windows Command Prompt

I know that I can launch programs from the Command Prompt, but is there any way to enter commands after opening that program? For example, if I open DOSBox from cmd, how would I enter a command in ...
1
vote
1answer
30 views

Completion of arguments for Cygwin commands not working due to `.exe` extension

When using tab completion in Bash on a Cygwin system to complete the name of a command, the .exe extension is appended to the command name, e.g, typing opens and pressing Tab completes the command to ...
0
votes
2answers
85 views

How to run exe file remotely?

I have an exe file placed on a remote server. I need to invoke it from other server directly/using a batch file. When I invoke using batch file it runs and it shows in the Task manager of invoking ...
0
votes
1answer
27 views

Calling a variable after underscore in Windows Command Prompt

In my batch file I am trying to call a variable after underscore. But the variable is not getting recognized if added after an underscore. set /p X=Folder name:%=% mkdir Delta_%X% So windows was ...
0
votes
1answer
20 views

Add backslash if a string doesn't have it

I'm developing a command line Batch file on Windows 7. I'm trying to add \ to a dir if it hasn't. This is only a test: @echo off set solutionDir=%CD%\ echo %solutionDir% if [%solutionDir:~-1%] ...
2
votes
1answer
54 views

How to kill a particular process(excel.exe) from command line?

My command goes as below: TASKKILL /FI "WINDOWTITLE eq Microsoft Excel - Book1 Mine.xlsx" ----> This works fine but when I save the same as "Book1 Mine.xsl" and run the same command TASKKILL /FI "...
6
votes
2answers
173 views

How do I check the current cmd aliases?

I know how to set command prompt aliases (using the doskey command) from another stack overflow thread, but given a command prompt, how do I find out which aliases are already set?
0
votes
1answer
92 views

Background process with stdOut/StdErr output in files and console

I want to SSH into a machine, start a process, write the stdErr and stdOut of the process into two seperate files while reading the stdOut/stdErr in the console. As soon as some specific lines were ...
1
vote
1answer
35 views

Different result from command line prog when run by Task Scheduler

I call the following program from within another command line prog... :: NT_getdate.cmd return yumd-date in var='ymd' @echo on setlocal for /F "tokens=2,3,4 delims=/ " %%g in ('echo.^|date /t') do ...
0
votes
0answers
14 views

How can I use the directory path of a batch file WITHIN that same batch file? [duplicate]

I want to use a batch file to create directories and copy other batch files to those directories. This is to automatically 'install' different batch programs by copying them to 'program files', ...
0
votes
1answer
25 views

Certain console apps “automagically” open a new console

Without installing anything new, certain console apps (eg xxcopy, diskpart) began to open a new console instead of displaying the output in the current console as usual: If I run CMD, a new console ...
0
votes
1answer
14 views

Why is php cgi loaded in path when doing a 'sudo su <user>" vs just being logged in which uses php cli?

When logged in as root user, php loads the correct version which is php cli. But when i do a sudo su < user >, php is is loading the cgi version which is breaking some of my applications that ...
0
votes
0answers
36 views

view files returned from shell commands

Very often I grep and find through directories (usually containing images) and I have to "visually" check the result before I can operate on the result (like deleting, moving, etc). E.g.: find ./...
0
votes
0answers
27 views

How to have error output from `ls` if target directory is empty

I'm currently learning how to use the Linux shell, getting to grips with the basic commands like cd, ls and pwd. My file structure is like so: user |-- documents |-- file1.pdf |-- file2.txt |-...
1
vote
1answer
40 views

Windows Command Line - List Network Adapter Components

I'm looking for a way to, in a batch file, get a list of the components (such as NDIS drivers) in use by each network adapter on the system. Here's a screenshot of the info I want in the network ...
0
votes
0answers
9 views

How do you make php-cli as the default command in the terminal? It's currenltly running php-cgi

When I'm root and I do a php version. It shows that I am running php-cgi: but I need to use the php-cli version which resides in /usr/local/bin/php -- When I'm logged out of root as a regular user. ...
0
votes
0answers
43 views

How to direct (Python) error messages printed in a PowerShell console to a text file

Firstly, the errors I'm interested in redirecting are NOT PowerShell errors, but those generated by a Python script that is called within my PowerShell script. I have read multiple post on here (and ...
1
vote
1answer
23 views

Why is my code for checking for an internet connection failing?

I am trying to edit a script so that it will check for an internet connection before executing the rest of its commands, but the problem is that no matter what I try the result (online or not) the ...
1
vote
0answers
46 views

Controlling encoding of redirected win console command output

Here is what I want to do: Redirecting properly the output of console applications (I use the term command in the rest of the message) into a file with 1252 encoding (to make it readable from any ...
1
vote
0answers
36 views

Having a message box used as a variable in batch program

I am attempting to have a batch program pop-up with yes or no options and depending what the user clicks will determine what the program will do. for example: @echo off Echo x=msgbox^("Yes or No?",...
3
votes
2answers
49 views

How to find count of lines present in a file using batch script

I want to count the number of lines in a file using batch. I have gone through this, but couldn't understand as I am a beginner. I have written my own piece of code with basic knowledge. @echo off ...
0
votes
0answers
52 views

How to find mp3 files on a remote server using Powershell

I have created a powershell script to search for mp3 files on my workstation. This is successful on my workstation, how can I run this on my network of 80 workstations? $strComputers = Get-Content -...
0
votes
0answers
27 views

How to specify password on Windows command line when executing java -jar to extract files?

On Windows 7 I have pairs of .jar and .dat files from an Apple computer (export result files from another program), e.g. foo.jar foo.dat. I can extract the files by java -jar foo.jar. But this opens a ...
0
votes
1answer
42 views

What does these command do in command prompt?

xcopy /E /V /I /F /Y "C:\Program Files (x86)\Diablo III" "H:\programs\Diablo III" cmd /C rd /S /Q "C:\Program Files (x86)\Diablo III" cmd /C mklink /J "C:\Program Files (x86)\Diablo III" "H:\programs\...
0
votes
0answers
16 views

can we print Tiff file on command line using windows photo viewer?

can we print Tiff file on command line using windows photo viewer? are there any command line options available to pass to windows photo viewer ?
1
vote
1answer
47 views

Registry keys for automatic time and time zones

Windows 10. I would like to know the registry keys responsible for "Set time automatically" and "Set time zone automatically" in Settings > Time and Language so I can modify them using the command ...
0
votes
1answer
28 views

Is there a difference between a command line flag and a command line option?

I am hearing these two terms interchangeably and I am wondering if there is any difference between them, like flags are for one letter options or flags are after a single dash.
0
votes
0answers
19 views

zoompan filter creates shaky image?

I try to perform a basic zoompan with FFmpeg. I have an input list image (.jpg 400x300) and i create slice image video (.mp4 400*300) from it, with a zoom each image. This is my command: ffmpeg -y -...
0
votes
1answer
69 views

Windows - Run process on background after closing cmd

I have a Python script which I want to run as a background process on Windows. I can do that on Linux with: python script.py & and then disconnect the process from the terminal with: disown ...
-1
votes
2answers
34 views

How can I re-hide previously hidden files?

Previously I used attrib -s -h -r /s /d to un-hide all hidden files in D:\. How can I re-hide the previously hidden files that are hidden by default? Most of them are desktop.ini and Thumbs.db
-2
votes
1answer
63 views

cmd: Find first letter from a string

I've no knowledge regarding cmd programming syntax. I have a text file containing user IDs which I need to delete using curl command and for that I need to extract first character of every user ID and ...
1
vote
1answer
14 views

grab history command and args for different commands

I have the following exercise: 47 vim wilson.0321 wilson.0329 I need to grab the last command and args to create: vim wilson.0329 right now I can grab the last arg or entire command: ...
1
vote
2answers
98 views

Cygwin paste long line is inserting newline at wrap point

I'm having issues with Cygwin's Copy/Paste functionality on a fresh install. If I scrunch my cygwin window small, and then type a command that is wider than it is (such as echo ...
3
votes
1answer
188 views

How to set chrome as default browser Windows 10?

I've tried setting default in the reg keys hkeycu>software>microsoft>windows>shell>associations>urlassociations>http and https. Tried using master_preference file tried using command switch --make-...
0
votes
1answer
26 views

How to get archive in cpio format with 7zip command line

"C:\Program Files\7-zip\7z.exe" a -tcpio initrd initrdcpio\bst mods\bstnet.ko I have tried this command, but got an error
1
vote
2answers
28 views

can't run console program in batch file

I have a batch file (run.bat) which is to change my IP address setting: netsh interface ip set address "lan" static 192.168.30.77 255.255.255.0 192.168.30.2 The command worked as I expected when I ...
0
votes
0answers
23 views

Updated Drivers - Command Prompt periodic executes

Well just recently I updated my drivers a bit ago and I would rather not have to rollback my drivers, but is there anyway I can track what program or the source of this commmand prompt that keeps ...
0
votes
1answer
30 views

Is there a way to toggle the Windows “compress this drive” command through a command prompt?

My friends laptop (a 64-bit Windows 7 Home Premium with 4GB RAM) was running slowly and she asked me to take a look at it. One of the things (besides that the disks had not been defragmented for a ...
0
votes
1answer
16 views

Restart Windows Services from Linux while keeping password off the command line

I'd like to write some scripts (run on my linux computer) to help automatically restart some windows services. While I've found many answers that suggest using net rpc service, they all involve ...
0
votes
1answer
21 views

Create a batch file to add a beginning and end to text file lines

Can anyone show me how to create a batch file to add a beginning and end to each line of a text file? I have a large list and it would take endless time to add this to beginning and end. Even a ...
0
votes
1answer
101 views

Access denied when modifing value of registry key [run as admin & owner of key]

So i found out that i cant really modify value of the registry , whatever i do with my permissions i cant get it to work from command line (I need to do this from command line since i want to use ...
0
votes
1answer
44 views

Using the “%~dp0” with command line arguments not working

Been concocting a deployment script for a software, which needs to install Visual C++ 2013 Redistributable, in silent mode, from a moving source (aka, the folder might be on a key, on a server, ...
0
votes
1answer
50 views

copy files from directory/subdirectory listed in text file (Mac)

I'm looking to search and then copy all files with filenames matching in a text file from a directory (with subdirectories) on a server to another directory. I've found a great solution (though quite ...
0
votes
1answer
31 views

Copy Multiple Files w/ Same Extension but Add Date

I want to create a single command that will backup all my *.db files in a directory but I want to append the current date. a.db -> a_2016-04-21.db b.db -> b_2016-04-21.db c.db -> c_2016-04-21.db I ...
0
votes
1answer
103 views

Convert MKV with DTS audio to MKV with AAC, AC3 or MP3 audio

I have an MKV with multi-channel DTS audio. Using ffmpeg from the command line I want to convert to MKV with either multi-channel AAC, AC3 or MP3 audio. Can someone please tell me command-line for all ...
0
votes
1answer
30 views

Combine 2 xml tags with SED

I create an xmltv.xml for TV listings and need to use SED for some post processing. Im using Windows 10 with SED for Windows run via a bat file. The trouble is only certain tags are shown on my ...
12
votes
5answers
2k views

How to open Command Prompt in a specific folder as Administrator?

I made a shortcut to cmd.exe and specified the folder that I want to start in. I then went to Advanced and ticked Run as administrator. When I double-click on the shortcut, it always starts in C:\...
0
votes
1answer
18 views

Rename php.ini.default to the more recognizable and standardized php.ini

When I type command: mv /etc/php.ini.default /etc/php.ini I get: bash-3.2# mv /etc/php.ini.default /etc/php.ini mv: /etc/php.ini....
0
votes
2answers
360 views

How to run a bash script via absolute path?

I have a file: /Users/danylo.volokh/test/test_bash_script.sh Content is very simple: #!/usr/bin/env bash echo "-- print from script" I'm in folder "danylo.volokh" This command runs fine: ...
0
votes
1answer
38 views

Passing http link to vlc as command line argument

When I type vlc http://192.168.1.2/new video.mkv into cmd, vlc tries opening two files. The first is http://192.168.1.2/new and the other is video.mkv. Is it the space in the file name that is causing ...