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
38 views

how to use space within pathname for Window's Robocopy

When my path for robocopy has a space, I surround it with " but get the weird error below... My .bat file contains: rem Backup scans ROBOCOPY "C:\Users\doug\Documents\My Scans\" "B:\BACKUP\My Scans\...
18
votes
7answers
123k views

Completely delete a folder in Windows using command line

I need to delete one folder containing other folders and files inside. I tried del and rmdir commands but sometimes they fail with some error lines: [PATH]: The directory isn't empty. Is there any ...
8
votes
4answers
11k views

Open source command line subtitle converter

Are there any open source, command line, subtitle converters - preferably for Linux?
1
vote
4answers
10k views

Extract all Zip's in a directory (incl. subfolders) with a .bat file or dos command

I want to extract all .zip's and .rars in a folder and its children The structure is like this: MAIN_FOLDER -A folder - a.zip -a.rar -B folder - b.zip ...
0
votes
2answers
52 views

CREATE a VPN Connection on Windows Command Line

I need to be able to CREATE a new VPN connection through the command line. I have seen things like rasdial but they are all for connecting to an existing VPN, not creating one, then joining it. The ...
2
votes
2answers
10k views

Easiest way to grant “Log on as a service” to a Windows user from the command-line?

I want to script an install where a service needs to be run as a user. I want to be able to specify the user. Creating the user is easy through the NET USER /ADD command. Specifying the user for the ...
14
votes
7answers
11k views

Advantages of cat'ing file and piping to grep

Are there any additional advantages of cat'ing a file and piping it to grep, besides convenience? The convenience being that, when I retrieve commands such as those below from my history, the cursor ...
1
vote
4answers
132 views

Is there a way to open windows command CLI from Windows Explorer with Administrator rights?

In windows explorer, you can open a folder and type "cmd" in the address bar. Then a CLI (cmd) is opened with the CWD set to the path that was selected in Windows Explorer. But this is not run as ...
112
votes
8answers
300k views

Using cd Command in Windows Command Line, Can't Navigate to D:\

This may be a stupid question, and I think I have looked elsewhere to find the answer... Might be a path issue, but when I open the command line and type from the C:\>: cd D:\ I cannot get to ...
0
votes
0answers
6 views

Specify schema from the Linux CLI when running script with psql

There's a lot of information out already on how to choose the schema and import a script from the psql CLI, but I have a use-case where it would be more advantageous for me to be able to choose the ...
-2
votes
0answers
33 views

How to recursively rename files and folders in a directory using command line

I'm wanting to rename all files and folders in a directory using the command line. basically when i install modules for grunt and then want to remove the site it complains that the length is too long ...
258
votes
5answers
193k views

How to open files in vertically/horizontal split windows in Vim from the command line

There must be a way, something like this: vim -[option] <file-list> to open files from command prompt and not from within Vim. split windows vertically or/and horizontally in separate tabs
0
votes
0answers
10 views

ecasound downmix from stereo to mono

This should be an easy one, but could find how to do it. I am trying to use ecasound to downmix a stereo audio file onto a mono file, keeping the same sample rate a bit rate. Any clues?
0
votes
1answer
34 views

2 cmd windows flash after boot

For some reasons after the boot 2 cmd windows popped up and closed very quickly. I've managed to take a screenshot As you can see it's prompting for some access denied error regarding OneDrive even ...
8
votes
3answers
4k views

How can I print full path of an executable command in Windows?

At the moment when trying to run tf command and/or any other run-able command, I need to open Visual Studio Command to get it executable. I like to use the normal console and/or the alternative ...
0
votes
2answers
27 views

GnuWin grep End-of-Line Anchor

I have GnuWin installed on a Windows 7 Enterprise SP1 x64 machine. I am trying to use grep 2.5.3 to match lines containing the word "true". The following is my working use-case: (echo true& ...
-3
votes
1answer
59 views

Windows 7 SYSTEM cmd possibility?

I have an access to system cmd (the one before you login to domain) and a non admin user located on domain. Since SYSTEM user is considered a higher privilege than admin in windows 7, how do I move ...
0
votes
4answers
13k views

7-Zip not working from the DOS prompt or command line?

I have 7-Zip installed, and it works from Windows, but not from the DOS prompt or command line: 7z e max_logs_can_messages.tgz Yields: '7z' is not recognized as an internal or external command, ...
3
votes
1answer
168 views

Is there a command line tool to run carbonite's “back this up”?

Is there some way to say "Back this up" to Carbonite on the command line on Windows? I know I can do it through explorer and the right click window, but I'm bit of a scripting fiend. I'm only trying ...
0
votes
0answers
25 views

How to resize window size according to a specific process name on console command?

I have an application, which automatically maximizes its window in each launch. Is it there any command like Win32 MoveWindow which can reposition and resize the window, according to a specific ...
140
votes
13answers
143k views

How to clear the contents of a file from the command line?

I have a log file that has a bunch of stuff in it that I don't need anymore. I want to clear the contents. I know how to print the contents to the screen: cat file.log I know how to edit the file, ...
19
votes
3answers
82k views

Command Line SSH restart Mac OSX Mountain Lion

How can I restart the SSH service via the command line on Mac OSX Mountain Lion please? Using ps aux | grep 'ssh', I was able to deduce that the process is most likely /usr/sbin/sshd. From here I ...
0
votes
0answers
9 views

Firewall rules by command in Windows will still work when using 3rd party firewall software?

Firewall rules can be set by command in windows, this way: https://support.microsoft.com/en-us/kb/947709 Would those command still work if the computer has a 3rd party firewall (like Comodo, ...
0
votes
0answers
33 views

Switch between DVORAK and QWERTY via command line in Windows 7/8.1

I am aware of the language bar and its shortcuts to switch between select input methods. But I was wondering if it was possible to do it from the command prompt or perhaps PowerShell, so that it can ...
0
votes
0answers
17 views

Why is no window loading from XQuartz when I try to choose a CRAN mirror to install a package from in R?

I'm trying to install a package in R in the terminal, and when it tells me to select a CRAN mirror, XQuartz opens but no window is created. I have a mac, and I don't know what the problem is.
3
votes
2answers
563 views

How to display a picture and print pixel coordinates when I click?

When using ImageMagick or similar command line tools it can be useful to know coordinates of some points in the image. How to display an image (with panning and zooming) and print coordinates of ...
4
votes
2answers
3k views

Synchronizing files using 7-Zip and the CLI

On the command line, 7-Zip has the command 'a' to "Add files to archive". But I want to synchronise the files instead. This is one of the main options in the GUI, but the CLI has disregarded it for ...
0
votes
1answer
33 views

How to reset the default Windows command line after installing Cygwin?

I have installed cygwin into my Windows 8.1 and configured the settings in the advanced system (Control Panel > System and Security > System > Advanced system settings > Environment Variables) It has ...
0
votes
1answer
29 views

Find the com port of a specific device on command prompt

I know we can find it out from the device Manager under ports. But I want to be able to get this info on command line so I can incorporate it in my python script. I looked at tools like WMI, Devcon. ...
1
vote
1answer
17 views

Move a directory and its contents up several levels

I have a directory with text files in /user/data/tutorial/texts/ and I'd like to move the (sub)directory Folder2/ with all of its contents to /user/. How should I go about this using unix commands?
22
votes
6answers
15k views

How to reset the looks of the Command Prompt window, in Windows?

I have made several customizations to how the Command Prompt window looks in Windows and now I want to reset it to its original state. How can I do that? I just want it to look that way it does after ...
11
votes
5answers
10k views

Disable auto launching of Photos application on Mac OSX Yosemite & El Capitan

I'm aware that there are solutions existing that allow you to prevent auto launch of applications such as iphoto or the newer replacement, Photos on a per device basis through the UI of Photos itself, ...
0
votes
0answers
50 views

Automate Exporting of Outlook Calendar to CSV

Is it possible to create a powershell or cmd script that will automatically export Outlook's calendar to a CSV file? Edit: There is a way to do so from within Outlook, but I was wanting an example as ...
0
votes
2answers
36 views

Misleading cmd prompt message

this is not that critical, but since it has been bugging me for 2 years now, I'll ask. I am a programmer, and I'm running a Grails compiler in Windows Command Prompt. When I need to terminate a ...
0
votes
1answer
52 views

Batch file that runs cmd.exe, several commands one after the other

I'd like to make a batch file that: Opens the Command Prompt Mounts an .ISO Then runs: DISM /Online /Cleanup-Image /StartComponentCleanup DISM /Online /Cleanup-Image /AnalyzeComponentStore DISM /...
3
votes
2answers
8k views

How to add sites to local intranet from command line?

I’d like to add two IP addresses of our servers to the local intranet on a list of computers. It seems that there are some problem with our policy and some PCs take it while others not. Is it ...
0
votes
0answers
10 views

Assign administrative access to all folders in a drive via CMD [duplicate]

MY primary hard drive broke down yesterday, which prompted me to have to buy a new HDD. I had a backup drive where I stored all of my files, however, I do not have administrative access to any folder ...
0
votes
0answers
67 views

How can I make a batch file play an MP3 file that starts minimized?

I've tried many things such as: set "track12.mp3" ( echo Set Sound = CreateObject("WMPlayer.OCX.7"^) echo Sound.URL = "%file%" echo Sound.Controls.play echo do while Sound.currentmedia.duration ...
0
votes
2answers
66 views

Importing variables in one shell script from another without executing the referred shell script

I have 2 shell scripts, file1.sh and file2.sh file1.sh #!/usr/bin/env bash export var1="/data/share" export var2='password' echo "Hello" file2.sh #!/usr/bin/env bash source file1.sh echo $var1 ...
1
vote
1answer
15 views

Performance with multiple instances of rsync across different direct-attached storage devices?

Would running multiple instances of rsync with all the sources and destinations on different direct-attached storage devices cause any performance hits, or would the speed limits for each individual ...
5
votes
4answers
2k views

Can't rename a file the name of which starts with a hyphen

I'm trying to rename a file with a hyphen at the beginning of its name and both this: mv -example-file-name example-file-name and this: mv '-example-file-name' example-file-name result in: mv: ...
-1
votes
2answers
519 views

When compressing a file on command prompt with RAR command, how to stop the process without cancelling it?

I used the following command: rar a -m2 file.rar *.xml \\myroute\ I want to stop the process on the file that have already been processed i.e. using Ctrl + C will cancel the process but not finish ...
-2
votes
2answers
375 views

Moving and rename a file by its directory name

I want to create a .bat file that moves an excel file to specific directory and rename the excel as its folder name. UPDATE: The idea of all this is that I want to copy an file, named below "fisier ...
-2
votes
2answers
130 views

7Zip Zipping up directories

I want to use 7 zip to compress and archive folders but I want it to exclude existing .7z files if they exist and not duplicate them with a .7z.7z ext. I found this but it duplicates the already ...
1
vote
1answer
90 views

Why does this email not arrive?

I have been attempting to send an email from the command line to myself, but the message does not appear in my inbox (or in spam or anywhere else). Below is the command I used, and a copy of the log. ...
1
vote
1answer
49 views

& was unexpected at this time

I have a batch file that is supposed to set some variables at the beginning. for /f %%A in ('wmic os get osarchitecture ^| find /i "bit"') do set "OSARCH=%%A" for /f "skip=1 tokens=4" %%B in ('wmic ...
0
votes
1answer
16 views

Compress only specific files from a folder while preserving folder structure

Say I have 1 main folder and 10 sub-folders, each with .avi, .html ,.txt and .srt in them. Now I want to preserve the folder structure but I want to only compress the .srt files into .7zip. Is there ...
-1
votes
1answer
20 views

How do I start a program with a hotkey after I started another

I want my program to start by pressing a hotkey, but only if another specific program has already been started, like for example, when I started fraps and then want to start a game after some minutes. ...
0
votes
0answers
9 views

Installing SourceTree from command line

Alright so I want to make a bat script that automates installing and setting up many programs, SourceTree too. Problem is I didn't find any way to set it up and install it from the CLI (using command ...
1
vote
1answer
42 views

Open “Change Your Password” window from command line

Is there a windows command (sent via the command line) that open the "Change Your Password" window as shown below.