Skip to main content

New answers tagged

0 votes

Hide files and folders with same name

This will spit out .zip files in the current directory that don't have a matching file/directory name: ls | sed 's/.zip$//g' | sort | uniq -u | sed 's/$/.zip/g' (To get only the files that DO match, ...
Dale A. Jackson's user avatar
0 votes

How to RAR files in alphabetical order

I found this page searching for help on RAR file ordering, so I wanted to add that the solid archive RAR option will forcibly place similar files from unrelated folders together in the archive to save ...
Raven's user avatar
  • 1
0 votes

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

If you're wanting to pipe lots of clipboard text into another program, you can use PowerShell's Get-Clipboard nowadays. powershell Get-Clipboard | more (To copy text, you can pipe it into clip, which ...
mwfearnley's user avatar
  • 7,543
0 votes

how to pipe output from a command in its own shell?

To pipe output from a command into its own shell, you can use the | operator followed by the command to launch a new shell. Here's an example in Unix/Linux: bash Copy code command | sh This will pipe ...
m salman's user avatar
1 vote
Accepted

how to pipe output from a command in its own shell?

The following is from man say. If the input is a TTY, text is spoken line by line.... Otherwise, text is spoken all at once. Below is what you are using. ollama run llama3:latest | tee >(say) ...
David Anderson's user avatar
1 vote

Trying to capture same functionality in Windows cmd prompts as in a PowerShell list of commands using net localgroup

Windows Some_File_Name.cmd: @echo off && setLocal EnableDelayedExpansion cd /d "%UserProfile%\Desktop" 2>nul mkdir .\test && cd /d "test" set "_log_file=%...
Io-oI's user avatar
  • 8,282
0 votes

how to enable and disable double click mouse options in kde

Settings + System Settings + Workspace + Desktop Behaviour Workspace Behaviour
amadich's user avatar
0 votes

What is the command line way of sending files to the recycle bin?

Not happy with some ways (MaDdoG and Aikwi are 404 anyways), I made my own tool: pure C, easy to compile (binary available in releases) no output (just 0 exit code on success), unless there's some ...
Krzysiu's user avatar
  • 276
0 votes

Zipfile character encoding challenge

Patch to fix is suggested for Ubuntu. You can apply it manually to get working unzip https://code.launchpad.net/~mitya57/ubuntu/+source/unzip/+git/unzip/+merge/466860
unxed's user avatar
  • 141
0 votes

command line to have windows explorer open folder in existing instance of explorer

I am don't feel certain I know what you are seeking, but I assume you are looking for a way in which, if Explorer is already open in a given path, sending a command to open an Explorer window of that ...
Hunnicatt's user avatar
0 votes

z80asm: Unable to resolve reference, but prints blank reference

So it looks like z80asm has a slight bug. If an instruction isn't fully typed (eg, "ld a,") it gives this "Unable to resolve reference" error. In my case, it was "RST". I ...
qwerty keyboard's user avatar
0 votes

How to determine the WiFi channel from Mac command line?

FYI that the airport utility mentioned elsewhere "is deprecated and will be removed in a future release" of MacOS. Since Mavericks (OSX 10.9), you can use the wdutil utility which should ...
SaxDaddy's user avatar
  • 3,997
0 votes

"Python" working but "Py" is not

One can run the python installer again and click Modify button. Select py launcher checkbox. Then click install button and wait for the installation completes. After all of these, py command will ...
krave's user avatar
  • 101
1 vote

How to change file path in BAT file based on the current user?

There are several environment variables that you can use. Pick the one that works for you. Of course, every user should have python.exe in their OneDrive folder. "C:\Users\%USERNAME%\OneDrive - ...
Berend's user avatar
  • 2,977
0 votes

How to switch git user at terminal?

GitHub CLI: As a contractor, I use several GitHub accounts so this is a constant struggle for me. I just started using the gh command line tool from GitHub and it really simplifies logging in from ...
ibyard's user avatar
  • 1
0 votes

Batch how to compress an .zip folder without root folder while also being portable

As an example using tar.exe in batch script: @Echo Off set "fol=C:\Temp\folder1" & rem folder to zipped set "zip=C:\Temp\folder1.zip" & rem location of zip pushd "...
Mr.Key7's user avatar
  • 813
0 votes

Batch how to compress an .zip folder without root folder while also being portable

This is the same for any zip tool, but let's say you're using Powershell, and your folder structure looks like: C:\Folder1\Folder2\myFolders\myFile.txt: # this zip will have a top-level folder (...
Cpt.Whale's user avatar
  • 8,027
0 votes

How to use ffmpeg to convert a flac file to alac and preserving all metadatas?

Something you can do, to help ensure proper tagging, is the conversion separate from the tagging. #!/bin/bash for i in *.flac; do filename="${i%.*}" ffmpeg -i "$i" -an -f ...
JayCravens's user avatar
-1 votes

How to run an .exe file in command line without adding PATH variable in Windows?

You don't need admin rights to change your own user variables. Press WINDOWS + R keys to open run command. Type: sysdm.cpl end press ENTER. Go to Advanced tab, Environment variables, and at: User ...
Antônio Carlos de Jesus Lima's user avatar
1 vote

Batch command with quotes fails to move files and delete folder with special characters

The name you are seeing is probably not the real name of the file, use: dir /a /x To see the file's real name and delete it, if the real name has really a colon in it try deleting by using the ...
Antônio Carlos de Jesus Lima's user avatar
-1 votes

Is there a difference between combining commands with & and running them one at a time?

There is no difference, but putting one command in each line looks better and is easier to debug if you have errors in your code.
Antônio Carlos de Jesus Lima's user avatar
0 votes

Windows PATH variable isn't working

When you add a new entry to your environment variables, you also need to restart terminal/cmd for the command to be recognised.
Xoteric's user avatar
0 votes

Windows "winget" says that a program is installed but it is not anywhere on the installation drive

I installed clink and couldn't find clink.exe. Why? Because it doesn't exist. Searching my drive for files that have clink has pert of their names, I get 4 files: clink.bat clink_x64.exe clink_x86....
Reddy Lutonadio's user avatar
0 votes

Windows "winget" says that a program is installed but it is not anywhere on the installation drive

It appears that the program were installed successfully. My confusion was about how the program clink actually works. It does not show up anywhere in normal command prompts: but only when launching ...
WestCoastProjects's user avatar
1 vote

Notepad++ open cmd in current file's directory

In the current version, right click the current file tab, select 'Open into', select 'Open Containing Folder in cmd'
Dan Goldstein's user avatar
0 votes

why don't work old batch ffmpeg extraestereo command in new version?

It is not working due to the audio mapping: -map 0:a. The following command should work: ffmpeg -i C:\Pelis\video.mkv -vcodec copy -acodec aac -b:a 384k -ac 2 -filter_complex extrastereo C:\Pelis\...
Rotem's user avatar
  • 2,592
0 votes

Reset Windows Update settings back to default, including respective local policy, by command-line only?

Thanks to all who responded. Actually I dig into LGPO.exe once more and found it pretty simple at the end. RTFM was key.. reading the documentation really helps.. What I did for my specific case: ...
I grok it's user avatar
1 vote

Is there a difference between combining commands with & and running them one at a time?

No difference. The & symbol is used to combine multiple commands in one line in batch scripting. @Echo off Echo Hello Echo World pause In one line: @Echo off & Echo Hello & Echo World &...
Mr.Key7's user avatar
  • 813
2 votes

Is there a difference between combining commands with & and running them one at a time?

No, it doesn't make a difference. I'm concerned that if I chain too many commands with & I might run out of memory at some point. If you're working in Cmd.exe, most of your commands are external ...
grawity_u1686's user avatar
1 vote
Accepted

What privilege is required by the caller to invoke the -ExecutionPolicy parameter of Powershell 7.x

No, you do not require administrative elevation to use ExecutionPolicy. While this is quoted for Windows PowerShell Script Security it has not changed for newer versions. It may seem odd to permit ...
jfrmilner's user avatar
  • 2,117
0 votes

How to Execute ShortCut From Command line in Windows 7

If instead, you want to run an .exe file in a different folder from the command line using a shortcut: The solution that helped me was: right click -> new -> Shortcut Enter in location: C:\...
user3456886's user avatar
0 votes

How to extract images from Word Document from Linux

I had a brunch of folders with .docx files. (No spaces in the folders names): ├── folder_1 │   └── file_1.docx ├── folder_2 │   ├── some_other_file_1.txt │   └── some_other_file_2.png └── folder_3    ...
Olivier Lasne's user avatar
0 votes

Copy multiple lines from Windows Command prompt without forced newlines

The following has finally worked for me in Windows 10: Enter the selection mode via system menu (Edit->Mark) Click and hold left Alt While holding it select your text lines with mouse Right click ...
Ilya Palopezhentsev's user avatar
1 vote

7-Zip Fails to Properly Unzip File via Context Menu and CMD, But Works in GUI

It could be there were two versions of 7-Zip installed. The GUI refers to the correct location, and the the Registry entry for the 7-Zip context menu item, in HKEY_CLASSES_ROOT\, is pointing to an old ...
DrMoishe Pippik's user avatar
2 votes

Is there a way to mute audio of a video played by vlc from command-line?

I've found a possible workaround to this issue which may work for your use case. In the VLC gui navigate to Tools > Preferences > Audio From here enable the check box on "Always reset ...
KwapKwap's user avatar
0 votes

How to compress gif effectively to reduce size?

Quick solution You can use the option -fuzz. convert input.gif +dither -coalesce -fuzz 10% -remap input.gif[0] -layers 'optimize' output.gif This is the result of the previous command line on your ...
Hastur's user avatar
  • 19k
0 votes

Using imagemagick or gifsicle to output GIF with specific filesize?

Even without an explicit request for the final size it is possible to use some commands to contain the final size. Everything that follows can be used on the command used to create the image or you ...
Hastur's user avatar
  • 19k
1 vote

I want to change the track and title of mp3 files using their ID3 Tag data in all sub directories too not just the folder I am in

How about ffmpeg? Well, ffprobe actually, but it's part of the package. #!/bin/bash set -o noclobber # just a precaution get_metadata() { local song="$1" local song_track=$(ffprobe -v ...
JayCravens's user avatar
2 votes
Accepted

How to use grep with a pipe symbol from the command line

gets rid of the error, but results in grep itself interpreting the pipe as a literal search character (i.e. it searches for the text a|b in the input rather than "a or b"). It has no effect ...
grawity_u1686's user avatar
2 votes
Accepted

A batch file with an executable file checks if it is not in the processes in order to run another batch file (or code from it)

I don't know exactly what you mean. This is just a script to run and close it. you can choose according to your wishes. (Admin right required). @Echo Off :NVidia CLS set #name=NVDisplay....
Mr.Key7's user avatar
  • 813
0 votes

Reset Windows Update settings back to default, including respective local policy, by command-line only?

Given that gpedit.msc and RDP were mentioned, I'll assume you're referring to locally set group policies for Windows Update settings, not domain policies setting them. To reset all user and computer ...
Vomit IT - Chunky Mess Style's user avatar
1 vote

Generic way to open $EDITOR at a specific line

The tig application (which is indeed open source under the GPL-2.0 license) supports opening a file with an editor at a particular line in some specific way. It does so by adding the line argument ...
nickie's user avatar
  • 496
2 votes
Accepted

How to change user's directory like 'Download' to other directory via command line in Windows?

In order to fix it, make sure you copy the desktop.ini from the source to the destination, and ensure that you change the file attributes of desktop.ini to give it alteast +s +h. Then change the ...
LPChip's user avatar
  • 62k
1 vote

How to run an .exe file in command line without adding PATH variable in Windows?

You should be able to change the Path for your own account with Windows Environment Variables UI, or set the variable explicitly from CMD.EXE to change your Path default value: setx Path "%Path%;...
DuncG's user avatar
  • 572
0 votes

Why does Windows command prompt command chaining not short circuit when a batch file returns non-zero?

Why is this the case? Having thought about this, this behavior logically makes sense. Since the batch file will execute multiple commands ignoring failures, all that command chaining would achieve is ...
douggard's user avatar
  • 191
0 votes

How to get current bandwidth usage from command line using built-in Linux tools?

I've just done similar thing and what I used was simply : (cat /sys/class/net/eth0/statistics/rx_bytes ; cat /sys/class/net/eth0/statistics/tx_bytes) Values are cumulative, so you need to save last ...
Jirka Justra's user avatar
5 votes

Why does Windows command prompt command chaining not short circuit when a batch file returns non-zero?

Command chaining does not short circuit when a batch script exits with a non-zero return code. The reason it does not work is that the entire command line/block has already been parsed by the command ...
DavidPostill's user avatar
  • 158k
1 vote

Why does Windows command prompt command chaining not short circuit when a batch file returns non-zero?

There are a lot of strange things when it comes to calling Windows batch files. Fix for your problem: cmd /C error_check.bat && echo Second Command!
Matthias's user avatar
  • 411
1 vote
Accepted

Give python program location services access via command line on MacOS

Check if you have other python version installed with Brew: brew list | grep -i python Remove them with this command: brew remove <package name> After that default python from Apple will be ...
Mikhail Pikman's user avatar

Top 50 recent answers are included