Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [command-line]

An interface for interacting with a computer using typed commands in a text-oriented environment, as opposed to a graphical user interface (GUI).

0
votes
0answers
13 views

Batch Scripting: How to code a UNC Path and set it on a directory variable?

I have initial batch script code working only in the Root directory, how can I set and access the directory using UNC Path? Here's the code: @echo off rem //Batch Script Code for JDE Flatfile ...
0
votes
0answers
7 views

When using Windows 10, how do you change all of the properties of start menu icons through command line, PowerShell, or Regedit? [duplicate]

I have had to remake a profile several times. The most cumbersome part is rearranging the start menu icons. Is there a way to make them all small, add groups of icons, and arranged in a certain order ...
0
votes
0answers
6 views

XCopy error code doesnt tally

i have a xcpoy command which copying content in a folder to another directory via Windows Task Scheduler. However, recently we noticed there were not some events, the xcopy doesnt really copying / ...
1
vote
1answer
16 views

Access denied when outputting to filename using variable

Windows 10, in my own Videos folder under UserProfile. I'm trying to string together a couple of things to make a complete txt file containing various information, in one single command line, right. ...
0
votes
0answers
9 views

make context menu vlc keys into cascading Menu

the context menu is filling up my screen so i want to turn vlc and other programs key into a cascading menu so it the context menu will be smaller and would like the option of opening a video in ...
0
votes
0answers
6 views

add a scan with ClamAv option to the context menu

i have added clamav folder to the PATH so i can use cmd to scan files but now i need this option on my context menu i tried to add a key under HKEY_CLASSES_ROOT*\shell named "scan with clamav" and ...
0
votes
0answers
8 views

How to stop timestamp from pr command

What is causing the timestamp written in the output file? pr - mJ <(ls -d /dir1/dir2/*/) <(sh /dir1/dir2/text.txt) > /dir1/dir2/output.txt When i view the output file cat /dir/dir/output....
0
votes
0answers
10 views

Reporting on NTP

I need to get a report of all network and server devices, what their time service is set to and what their current time/date is. Is there any quick (ish) way to do this?
0
votes
1answer
31 views

SSH Function Error in ZSH

I have the following function in my zshrc file: fssh() { ssh -NfL $1:localhost:$1 graphite } When I call fssh 8443, I get Bad local forwarding specification '8443ocalhost:8443' How can I fix ...
0
votes
0answers
30 views

ffmpeg freezes when piping two inputs

I currently have a command that has two piped outputs input into two pipes into ffmpeg { youtube-dl -f bestaudio[ext!=webm]/140/best[ext!=webm] --no-cache-dir -o - https://www.youtube.com/watch?v=...
0
votes
2answers
12 views

How can I replace operation print in batch with a message?

I'm working on a simple tool that copies files to and from desired locations and I want to replace the print in the CLI with a message of my choosing, I've looked around and so far all solutions I've ...
0
votes
0answers
18 views

In Windows 10 can ProgramData/…/SystemData Folder be emptied of contents without consequence?

Would like to know if I can safely delete the contents of the C:\ProgramData\Microsoft\Windows\SystemData folder, all folders and files there in. It seems that these folders may be auto generated, ...
1
vote
1answer
48 views

Using percent signs (%) in echo statement on same line as IF conditional check of variable

I'm trying to use this line in a batch file If NOT "%1%"=="foo" (echo %bar% Text. >> "%USERPROFILE%\Desktop\Log File.txt") and when I run it I get this ) was unexpected at this time. C:\> ...
1
vote
2answers
43 views

Batch file will not run - only opens Notepad++

Running Windows 8.1. This worked a few days ago. Really do not know what has changed, nor am I aware of any update that might have stopped this working. When I run a .bat (batch) file (right-click &...
0
votes
0answers
23 views

if-else statement for a new folder name change [on hold]

I need help with a command line if else statement I need to create a .bat file that creates an if_folder only once a new_folder exists how can I do that? This is what I have tried: IF NOT EXIST ...
0
votes
2answers
39 views

Customize csh prompt based on uid/superuser status

I'm trying to set up a condition where my csh prompt is customized to change username color and prompt character if I take on root privileges via "su". What's the most sensible way of doing this? ...
1
vote
1answer
45 views

Rewrite the first three characters of *.ext file names in a folder with a set of letters

How to rewrite the first 3 letters of file name Using set alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 to randomise characters Targeting all files of a particular extension in a folder *.ext ...
7
votes
6answers
603 views

How to get the n-th line after a grepped one?

Consider the following text file one 1 two 2 three 3 four 4 five 5 six 6 seven 7 eight 8 I would like to access to the second line after the one which matched four. This would be the line six 6 ...
0
votes
2answers
35 views

Robocopy: copying files without their directory structure

I have a network fileshare called \\SMWEB\MSDS which contains hundreds of sub-directories named MSDSnnnn (i.e., MSDS plus a number).  Inside each sub-directory MAY be numerous files — some .html, .jpg ...
1
vote
0answers
12 views

Trying to install gcc+ in Git [duplicate]

For Installing gcc+ in Git for the Windows bash environment I can't seem to find anywhere the proper order of which should I download first? And how I would go about setting up the PATH environment. ...
0
votes
0answers
15 views

Command line interface for Photos App in WIndows 10

Let's say I have a few images in a directory. When I double-click one of them it opens up in the photos app and I can view the other images using left/right arrow keys. However the behavior is ...
1
vote
1answer
24 views

How to measure memory usage by certain programs accurately from the command line on Windows?

I'm trying to write automation for memory leak testing of a website. I can see a memory leak by going between two pages so I have selenium automate going back and forth between them. Before the ...
0
votes
1answer
36 views

How do I take the stdout of two commands and pipe them as two args into sort?

I can do the following: sort -nbms file1.txt file2.txt and it will merge the two already sorted files. What I wish to do is take the output from two commands (its sorted) and pipe it in as input ...
0
votes
3answers
33 views

Is possible to change Desktop/Documents/Pictures directory location with commands on a batch file or powershell?

I already read these two posts: Change location 1 Change location 2 I need to do this manually on a couple of computers, not via GPO and MKLINK is not a valid option. But since I need to move the ...
0
votes
1answer
34 views

How do you disable startup programs that only exist in the Task Manager Startup tab via command line?

Searching the web yields plenty of results for Get/Set-Service, wmic and sc and plenty of GUI options with msconfig and Task Manager itself, but I need to setup an unattended install of a Windows ...
0
votes
0answers
18 views

7zip command to extract all zip files from folder AND subfolders?

Using the command line, I want to be able to just cd into a folder and run a command to extract ALL archives from the folder, including all subfolders. Example: I have a folder asdf that I cd into. I ...
0
votes
1answer
53 views

Win CMD: How to simply copy a folder without typing name twice?

I have a folder with a few files: - folder1 file1 file2 And want to copy it folder some folder2. Expecting following structure: - folder2 - folder1 file1 file2 I could ...
0
votes
0answers
5 views

Is there a tool to convert SVG <text> + <font> to <path>? [closed]

I have an SVG file that contains <font> and <text> elements. I want a commandline tool that will convert these to simple <path> elements, much like Inkscape's Object To Path option. ...
0
votes
1answer
42 views

Make a .vbs running in background visible to be able to cancel it

I have a .vbs-Script that is running in the background endlessly. This script does not have any way for the user to interact with it; a regular user won't even notice something is running in the ...
5
votes
2answers
356 views

Set and print content of environment variable in cmd.exe subshell?

Consider this example, where I start a new "sub" instance of cmd.exe, and then try to set a new environment variable in it, and then check if it has the proper value set (this is in cmd.exe of Windows ...
0
votes
0answers
121 views

ImportError: Missing required dependencies ['numpy']

I'm trying to schedule some python script with the Windows scheduler. Unfortunately, I run into the following error when I try to execute my script from the Command Prompt: "Missing required ...
1
vote
2answers
67 views

Move a copy of unknown named images and rename - Powershell or Batch Script

Copy first ten jpg files in folder in alphanumerical order to new folder with out prior knowledge of jpg file names. Give each ten files in new location specific names like 'e100.jpg' - 'e110.jpg'. ...
0
votes
0answers
26 views

7z.exe Extract Only Updated Files

I have .zip file which has around 40,000 files. Questions: For the first it takes time to extract, fine no problem, but for the 2nd run should only extract files that are found to be changed than ...
0
votes
2answers
21 views

How do I customize the PowerShell Integrated Console prompt in VSCode on Mac?

In Microsoft's VSCode, I want to customize the integrated PowerShell prompt like I can with my .bash_profile. It appears you can edit it to your liking according to this document, but I am unsure ...
0
votes
0answers
30 views

zsh set title to current directory or current command, using named directories

I have a named directory configured in my .zshrc: hash -d foo=/foo/bar/baz/some/long/path If I set my zsh window title format like this: (I'm using zprezto): zstyle ':prezto:module:terminal:window-...
0
votes
1answer
43 views

Rsync error in task scheduler

I need to run a cron with rsync. I wrote a batch script, That is my script: START C:\cygwin64\bin\rsync.exe -v -rlt -z -p --update --delete --progress --log-file=/home/Administrator/rsynclogs/...
0
votes
1answer
35 views

Bash ls auto-completion of variables adds additional white space at the end

I use bash 4.4.19 in a gnome-terminal 3.28.2 on ubuntu 18.04. I have had issues with tab-completions of directory variables in the console, which seemingly could be solved with shopt -s direxpand ...
0
votes
1answer
37 views

Linux cat command to read the content of binary or pdf file

So I tried to read the content of a file with cat command. But the output was gibberish as the file was a binary file, and that I can understand. But the output was very different from what I see on ...
0
votes
1answer
44 views

Windows shortcut, Command Line and Perl

I developed several scripts using the command line in windows (which is needed because there are several 'say' comments that need to be shown) and using the line: perl "D:/path to script" That's all ...
1
vote
2answers
69 views

Any command to list the memory in MB rather than kB from /proc/meminfo?

Cat, less , more , head tail etc. tried with all options that I am aware of. Can't find how to list the memory in Megabytes rather than kB.
0
votes
1answer
15 views

Raspbian space disk by default

I'm doing my first steps with Raspberry Pi (3B+), and I'm not sure about my SD card. I already have a 8 GB, but my question is : Is a 8GB SD card enough to install Raspbian and few packages such as ...
0
votes
2answers
60 views

Using built-in commands from running process in script

So lately I've been trying to quit a running process in a clean manner, through its 'quit' command. If I don't go through the entire quitting process it creates a .lck file and I don't want that. I'...
0
votes
0answers
26 views

Chromasoft pcdtojpeg command line for multiple files? [closed]

Chromasoft's free pcdtojpeg.exe works great to convert old Kodak disk pcd files to high quality jpg files, but it only can do one file at a time and I have a couple of hundred images. After doing some ...
0
votes
0answers
92 views

Equivalent of Unix cat / tail for cmd or PowerShell to flush the current content of a serial port into the stdout without opening it

There is the echo cmd command which can send a string to a COM port without opening it up: echo Hello > COM1 I'm aware of the PowerShell (PS) procedure, creating a serial object $port= new-...
1
vote
2answers
69 views

How to force closing / freeing the serial ports opened by other programs in cmd or Powershell

Following this post, I can use cmd's mode command to see the available / free ports. I can also use the PowerShell (PS) 's oneliner: Get-WMIObject Win32_SerialPort | Select-Object DeviceID to see ...
0
votes
0answers
27 views

Windows File Type Association - Open bat in same powershell window [duplicate]

EDIT: My .sh file association is working, that isn't the question. The question is if it is possible to run the script from powershell without it opening a new cmd window I am currently experimenting ...
0
votes
1answer
23 views

How do you see what symbolic links are in a directory?

When I try dir /A I see some links but not all. The links I don't see are put there by a startup script from corporate. Is it possible to create a link such that it's visible on the users desktop ...
0
votes
1answer
65 views

List all the serial ports (available and busy) on any of windows terminals

The cmd's mode command shows all the available (to be opened) serial ports, omitting the ones which are by other programs. The PowerShell's command: [System.IO.Ports.SerialPort]::getportnames() ...
0
votes
1answer
18 views

Splitting up lines in a paragraph of a text file using Mac Terminal

I have the following: sanskrit verse ॥ २॥meaning word-wise of sanskrit।hindi verse। Desired output with 1 line gap: sanskrit verse ॥ २॥ meaning word-wise of sanskrit। hindi verse। I have a Mac. ...
1
vote
0answers
13 views

Escalate existing instance of Command Prompt to administrator rights? [duplicate]

Is there a way to escalate an already existing instance of the Command Prompt to administrator rights in Windows 7? I am logged in to an Administrator account (an "Administrator" account as opposed to ...