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
3answers
126 views

Copying folders in Windows

I have the following folders on a Windows machine C:\FolderToCopy C:\Dest Both folders are empty. I want to execute a copy operation from a command prompt so that I have this in the end: ...
4
votes
3answers
30k views

Is there a Windows command line tool to copy files to remote computers?

I'm looking for a way to copy files over to/from remote Windows hosts, and need to provide domain user credentials as part of the process, similar to the way psexec does. I know I can use net use to ...
5
votes
7answers
28k views

How to disable sleep mode via CMD?

With only the command prompt, is it possible to disable sleep mode when closing the lid of a laptop?
1
vote
2answers
75 views

I want to delete a certain number of oldest files in a folder with .cmd

I have a backup folder where are for everyday day a Backup-folder (like 15.06.; 14.06; 13.06.....) containing the backup files. I now want a to delete (in .cmd file) An amount of x oldest folders ...
2
votes
2answers
65 views

Can I adjust command line output to make columns vertically align?

The first image is Mac terminal output, these columns are vertically aligned. This is Windows cmder output, in a mess. Can I adjust it?
0
votes
3answers
10k views

Setting environment variables and appending to system-wide %PATH% with a Windows batch file

I'm trying to set three environment variables and append them to the machine path. Right now my code is like this: setx CATALINA_HOME "C:\Program Files (x86)\Apache Software Foundation\Tomcat 7" /m ...
0
votes
0answers
70 views

Keep receiving BCDEdit “The system cannot find file specified” errors

I'm currently having a huge problem where I cannot play CS:GO due to an issue with enabling/disabling DEP, Kernel Debugging and Kernal Integrity through BCDEdit in Command Prompt. According to THIS ...
1
vote
1answer
3k views

Bypass wifi-activation-button in XP start-up on Amilo L1310g

Right then. I have a problem on a Fujitsu Siemens Amilo L1310g. This (old) machine is constructed with a ("feature") physical button that activates the wireless internet. When pressed XP starts ...
0
votes
1answer
39 views

PowerShell - Quasi equivalent strings are infact not equivalent?

I have a string which I'm passing into my script as an argument. For the purpose of displaying the code on here however, I have specified these manually in the code. These variables are: ...
1
vote
1answer
118 views

Can't run batch file in Server 2012

This site rocks! I am trying to run a simple .bat file on Server 2012 that will ping another server, filter out all the lines except one, and then write to a file for later use (I then want that file ...
3
votes
2answers
35 views

Get the first few characters without the extension of the file in DOS

My files are AAAAAAA-01.pdf , BBBBBB-02.pdf, CCCCCCC-03.pdf I was able to generate an excel list of file name in the folder without the extension using this command below: for %%i in (*.pdf) do @echo ...
1
vote
2answers
27 views

Powershell: Dir /s - Remove Repeated Folders

Situation: In Powershell, I'm using: $folders = dir -s C:\Users\Name\Downloads\*.ttf | Select Directory foreach ($folder in $folders) { echo $folder } To display folders whose contents ...
0
votes
1answer
12 views

find certain item of a file by using command line tool in windows 7

recently I used findstr "ItemThatIsBeeingSearchedFor" C:\Windows\System32\drivers\etc\hosts > J:\documents\HostsFile\ResultOfSearch.txt in order to output a certain entry of the hosts file into ...
0
votes
1answer
37 views

How to use PSExec (or similar) in a cmd script to kill a task

Courtesy of some buggy third party software, we regularly (and frustratingly) have a task that sits in Task Manager and cannot be killed - all attempts to do so result in "Access denied". This ...
1
vote
2answers
3k views

Windows “tree” command sorts randomly

When I run tree /a /f > output.txt in Windows' cmd, I get a nicely formatted directory structure. But the directory listing is not in any particular order. How can I get the tree to sort folders ...
0
votes
1answer
42 views

how to stop command execution in command prompt windows 10

in recent release of windows 10 command prompt microsoft have placed ctrl c and ctrlv ,in older versions we used to stop command prompt execution by pressing ctrlc In recent release of windows 10 ...
1
vote
2answers
6k views

Imagemagick convert returns “no decode delegate for this image format”

I am trying to use this command for ImageMagick: convert "c:\users\****\My Documents\test.png" -transparent white test2.png However, I keep on getting two errors that look like this: ...
6
votes
6answers
22k views

Move files from multiple folders all into parent directory with command prompt

I have multiple .rar files in multiple folders like this: C:\Docs\Folder1\rarfile1-1.rar C:\Docs\Folder1\rarfile1-2.rar C:\Docs\Folder1\rarfile1-3.rar C:\Docs\Folder2\rarfile2-1.rar ...
0
votes
1answer
39 views

Spawn command line prompt to a remote Windows machine

Is it possible in Win7, Win8.1, Server 2K8 and 2012 to "shadow" or rather spawn a console and 'impersonate' or 'masquerade' a user command line prompt ? I am domain admin and I would like to interact ...
7
votes
5answers
5k views

Can you dynamically resize Windows Command Line window?

Windows Command Line window has a fixed size. You can change it, but not on-the-fly, with a mouse. But maybe it's just me or my system (Windows 7). Can you dynamically resize Windows Command Line ...
3
votes
3answers
26k 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 ...
0
votes
2answers
261 views

sed: What does exit code 2 mean?

Case I am trying to replace all occurrences of <value>*</value> into <value>file:\\</value> in a designated file test.txt. I work on Windows and use sed I have installed with ...
3
votes
2answers
76 views

How to open a batch file and execute a command AFTER opening command prompt

I am trying to create a batch file that first opens command prompt and then executes "prompt $t$gEnter Command Here$g". I have tried starting it with "%windir%\system32\cmd.exe" and then using ...
0
votes
1answer
16 views

reject pattern and N following lines (or send to a different file)

I have extraneous output in the form of my pattern 28374017032 something random following something else random following the pattern more numbers and I can easily reject the line containing the ...
2
votes
1answer
27 views

Command on new line

I have the following command: cd ../../game ^ electron src that I need to run. Which basically means step up two folders from our current directory then into the game folder and call electron on the ...
2
votes
2answers
4k views

Command line jabber chat clients for windows?

I only use Google Talk, and was wondering if there were any jabber command line clients for windows? I prefer command-line as I use it a lot on a day to day basis, and it seems much easier. The client ...
0
votes
0answers
16 views

Random output from line of python code appearing in Command prompt help menu [migrated]

I was playing with the interactive Python interpreter, and decided to see what the help session said about different modules. When I typed "modules", I was given a list of modules, and a user query ...
5
votes
3answers
54k views

How to find username on remote computer?

I have the IP addresses of some computers on my network. Is there any command line tool like PsExec, which can take the IP Address as input and find out the username of the currently logged in user? I ...
0
votes
0answers
33 views

rdiff-backup operation not permitted

Objective I'm trying to execute the following command in my Python script: rdiff-backup --terminal-verbosity=5 --remote-schema "ssh %s -p1019 -i C:/Users/Adam/.ssh/private-passphrase ...
0
votes
1answer
6 views

Can you create mulitple groups at once in bash?

I'm trying to create multiple groups at once and give each one an ID. Can you do this without continually using the groupadd command? groupadd group1 groupadd group2 Thanks.
1
vote
2answers
26 views

Send Ctrl-C to piped command

Using a command like: tcpdump -w - | bzip2 -c > capture.cap.bz2 If I press Ctrl-C to stop the tcpdump command, I end up with a broken bzip2 archive (I'm assuming because I've terminated both ...
40
votes
6answers
66k views

Can you browse a UNC path using a command line environment without mapping it to a network drive?

C:\> cd \\somewhere '\\somewhere' CMD does not support UNC paths as current directories. What I usually do to get around this is to map that directory to a network drive and then I could easily ...
3
votes
2answers
8k views

Batch delete : Access is denied

As the title suggests, I'm having issues with the del command in a batch file. When it gets to the delete step I get the message "Access is denied". My batch command looks something like this. set ...
1
vote
1answer
3k views

How to filter running in VLC video stream on commandline?

I easily can broadcast my webcam with VLC using command lines like this (I use Windows): "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" -vvv -I --dshow-vdev="Logitech QuickCam Express / Go" dshow:// ...
0
votes
1answer
42 views

Is it possible to make a VBScript which executes a batch script within itself?

I know it sounds strange, but my idea is creating a single text file which contains a VBScript and a Batch Script within it, i.e. if I run that script as a VBScript, it calls itself as a Batch script, ...
0
votes
7answers
135 views

Is it possible to always run cmd from Windows' Run panel as admin?

I'd like to be able to start Command Prompt as admin either as default or as an easy routine. I know about Ctrl+Shift+Enter in the search list or adding a Registry Entry for a new Context Menu, but I ...
0
votes
2answers
42 views

Remove empty directories

I found this command on this site for recursively removing empty directories, but was unable to comment to ask this question since I just registered and have zero rep....... for /f "delims=" %d in ...
26
votes
5answers
105k views

How can I find out when Windows was last restarted?

How can I know when my computer running Windows 7 was last restarted? I prefer a solution that doesn't involve searching the event log, but something like wmic or maybe cmd commands.
8
votes
6answers
65k views

How to run an .exe from linux command prompt

I am new to Linux. I am currently trying to write a command line which should execute a *.exe inside a folder abc. I have tried % cd abc info.exe But the error says no such file or directory. ...
15
votes
4answers
18k views

count lines in a compressed file

if i have a .gz file on unix which has certain number of lines. How could i count the lines on unix without uncompressing it.
71
votes
7answers
118k views

How to copy symbolic links?

I have directory that contains some symbolic links: user@host:include$ find .. -type l -ls 4737414 0 lrwxrwxrwx 1 user group 13 Dec 9 13:47 ../k0607-lsi6/camac -> ../../include 4737415 ...
0
votes
1answer
59 views

Batch converting files using ffmpeg

Can anyone tell me where I'm going wrong doing this. The idea is to find and convert all files in a directory to m4v's. Regardless of the extension. Then once it has been converted, to generate a ...
0
votes
1answer
119 views

How To Enable Syntax Highlighting for Nano In Windows?

I am a huge fan of the nano editor, but I can't get the syntax highlighting to work in the windows version. Is it possible to have syntax highlighting in windows?
1
vote
2answers
1k views

Is it possible to change the speech rate in OS X say command?

say -v Alex "Hello" Is there a way to change the speed of speech like there is in the speech settings of System Preferences -> Date & Time -> Clock -> Customize Voice?
0
votes
0answers
25 views

`pip: command not found` and other issues

I have several virtualenvs on my computer and I use them extensively. I create new ones and modify them all the time. However, when I tried to create a new one today, I found out that none of the ...
0
votes
3answers
50 views

How to append multiple .txt files to one file without header line

I have 100,000 .txt files with format below: bygrp,colnum,beta 100005,1,0.629519434191718 100005,2,-0.500000000026516 100005,3,0.560850895321124 100005,4,0.119624318119292 100005,5,0.257676682753309 ...
0
votes
0answers
22 views

How to download file from a local server cache windows server

How could I download a files from a local server cache address path I was given? Not sure how to do this on windows server: Link to local sever cache: \\sdgd07mjbvbw2\Users\BuildUser\Downloads Here ...
0
votes
0answers
35 views

Manipulating excel file from command line

I have written a Python script that generates an excel report file with some data. Then this file is automatically sent to a list of recipients. What I'd like to do though is to make the excel report ...
1
vote
0answers
34 views

How do I use the Python commands in PowerShell?

I work in a GIS department and I'm trying to learn Python to automate something boring. I started using "Learn Python the Hard Way", but I can't figure out how to run Python scripts from PowerShell. I ...
0
votes
1answer
44 views

delete items from path environment variable

I have a question regarding editing the path environment variable on my windows 7 Machine. I have been editing my path using SystemPropertiesAdvanced.exe's dialog window, but the changes i make are ...