Questions tagged [batch]

Questions about batch-processing - how to apply the same procedure to a lot of files/objects.

Filter by
Sorted by
Tagged with
0 votes
0 answers
37 views

How to batch rename a bunch of files of same type inside folders to that the numbers in the name are inside brackets? via terminal

Ubuntu 20.04 I have files stored in the following fashion as a example: Uni - Biology - 01122023 Class 01 - subj dfsg.txt 02122023 Class 02 - subj eweg.txt 03122023 Class 03 - subj ewq.txt ...
Kaikidan's user avatar
-4 votes
2 answers
89 views

What is going on with the lslogins instruction

The lslogins instructions lists down the user info of all users however isnt this unsafe? For example suppose a hacker pretends to like you and ends up spending the night with you just to access your ...
Root Groves's user avatar
0 votes
1 answer
70 views

Move files to Sub-Directories via list.txt

I have this Batch file that works quite well, however, I went back to Ubuntu and need to convert these .bat into .sh files. This is the code I have on Windows and it works well. @echo off /u cd /d &...
Lex King's user avatar
1 vote
1 answer
48 views

Move Files from .txt

I have all my files in a parent directory, "Folder". I have a Text document with all their appropriate locations. What I want to do is to move them from Parent directory back to their ...
Lex King's user avatar
2 votes
1 answer
89 views

How to batch delete the first n bytes of a series of .jpg files to fix corrupt headers

Situation: I have a folder filled with .jpg files that have corrupt headers: .jpg files need to start with FF D8 FF E0 to be interpreted as images, but my files have random values in the first four ...
Chuctanunda Spiderbone's user avatar
1 vote
1 answer
194 views

Batch convert multiple, specific images spread across dozens of folders

I have a list of JPG files, each located in different folders on my command line only server, that I need converted to PNG. I know the simple command to convert them one-by-one using mogrify. But I ...
Matt's user avatar
  • 111
1 vote
1 answer
127 views

Simple queueing system for parallel processes

I want to setup a queueing system for my workstation, which has 32 processors. In principle, I would not connect it with any other workstation. I mean to use a system which is simple to configure and ...
sancho.s ReinstateMonicaCellio's user avatar
-1 votes
1 answer
60 views

one file paste into multiple folder with folder name

I Have one report file (1.xls) this 1.xls should copy into all name folders c/desktop/test/ inside the test folder i have this file 1.xls and i have the folders also aaa_001 bbb_002 ccc_003 I need ...
Sholingan S's user avatar
3 votes
1 answer
3k views

Using a batch file on Windows to automate Ubuntu in WSL

I'd like to automate Ubuntu through a single-click batch file in Windows. I can just start ubuntu, but if I add /k cd "path", it just doesn't do anything. It exits with no error. I'd like ...
kntcroizzant's user avatar
1 vote
3 answers
261 views

How to delete a bunch of files in a folder knowing a part of their filename?

I have a folder of Markdown files. The files use the following filename convention: [Time-based ID] [Title]. With this convention, you have filenames such as 202204101548 Banana bread or 202204101549 ...
Annabella's user avatar
0 votes
1 answer
1k views

How to convert subfolder in a directory using ffmpeg in ubuntu

I was looking for a code to convert video files in a directory where it has multiple subfolders for each video file. I want to run a batch code so it can convert the video files and save them where ...
devender vutukuru's user avatar
-1 votes
1 answer
364 views

Batch ffmpeg conversion: windows to linux

I have a windows .bat file that converts all the .mp4 files of a certain folder (increases speed in a 1.5X ratio), places all the transformed files in an "out" subfolder, and finally deletes ...
SAUL BLANCO LANZA's user avatar
-2 votes
3 answers
265 views

How can we replace * with 1/2-1/2 or 1-0 or 0-1 at the end of last line(content) of each and every text file within same directory?

I have succeeded in several operations of text files with guidance of you friends. Firstly thank you very much for helping me with commands. Now, I wish to move further in these operations on text ...
user avatar
0 votes
1 answer
581 views

Zip multiple folders to individual files with password protection

lets say that I have a folder containing 250 more folders (f1,..f250) and I want to zip each of these 250 folders into an individual zip-file that is password protected. I found this answer with the ...
Hirshy's user avatar
  • 101
3 votes
2 answers
1k views

How can we batch convert chess move files of .pgn file format to .bin file format?

Prologue: A .pgn format is type of text file format used for recording Chess moves with other information like date, event, score, opening, engine evaluation, variations, depth etc. This file format ...
user avatar
2 votes
1 answer
2k views

Mass/Batch renaming text files based on the first line (content) of the text file in Ubuntu 20.10?

I have 2015 files which are .pgn files. This is a form of text file only, opens with Notepad++. I am I want to mass rename these files replacing their name with the first line of the respective file ...
user avatar
0 votes
1 answer
840 views

How to Bulk / Batch Rename in Terminal? [duplicate]

I Have Question, How to bulk / batch rename in terminal ? i use ubuntu 16.04 64 bit example i have 5 file (GreatSoftware) AVG Anvitirus - 1.exe (GreatSoftware) Windows Media Payer - 2.exe (...
Joe Cola's user avatar
  • 343
0 votes
1 answer
335 views

Batch to Bash Script

Could I get some help converting this batch script to an shell script? I don't know how to get the second part working, would I just pipe the first into the 2nd instead of having the brackets? (and ...
Orophix's user avatar
1 vote
2 answers
126 views

Renaming files and directories

I have a ton of file films and directories which naming structure is: Name of the film (Author, year) or Name of the film (Author, year) LANG I intend to rename them all (almost three thousands) in ...
Vidal's user avatar
  • 97
8 votes
1 answer
8k views

How to batch / multi process cropping images in the terminal?

I tried to crop several images of the same size, but when I crop 5 images and the process is complete, only 4 images are cropped, 1 image is not cropped, if I crop 1 image an error will appear... I'm ...
Joe Cola's user avatar
  • 343
0 votes
1 answer
146 views

Batch Convert videos in Nested Folders

I used the excellent script from Byte Commander How can I convert all video files in nested folders? (batch conversion) I have two questions though. 1) Is it possible to completely mirror the source ...
guigeek's user avatar
0 votes
0 answers
341 views

Batch resize a folder full of SVG

I have some Google Material Design icons in a folder. Around 100 of them in a folder. They are very small, the canvas is only 24x24 px. I got Inkscape installed and can resize them one by one. But ...
user227495's user avatar
  • 4,059
0 votes
1 answer
709 views

Number of subdirectories allowed

I would like to know the number of sub-directories created authorized. Do you know what to do to find out?
sabayke bremso's user avatar
1 vote
2 answers
9k views

Can I run Windows .bat files in Ubuntu?

I want to run a .bat file in ubuntu, but it just opens the text editor. Here's the code of the .bat file(you can play it): @echo off set /a guessnum=0 set /a answer=%RANDOM% echo Welcome to the ...
code913's user avatar
  • 19
1 vote
1 answer
118 views

How do I run similar commands with files in ten separate folders?

I have a folder y2015 in which I have ten subdirectories (d001, d002, d003, ..., d010). In each dXXX folder I have to run these commands which are shown below: gd2e.py -mkTreeS myKinTree rm /...
Mohammed Yousuf's user avatar
0 votes
1 answer
97 views

How to list all mp4 files with HDp60 (to separate them from p30)?

I need to separate my mp4 files into p30 and p60 and would like to use command line tools to do this. I know that there is an option to check the details of a media file and I need to do this as a ...
bomben's user avatar
  • 2,049
0 votes
0 answers
241 views

run batch files with setsid

I want to run many tasks which are defined is a batch file, for example task.sh for i in 1 2 3 4 5 do setsid python main.py 1>data/${i}_a.log 2>&1 sleep 3 done echo "OK 1" for i ...
GoingMyWay's user avatar
2 votes
2 answers
333 views

How to compress 3000 images in batches of 50

I have a folder with over 3000 images, I want to compress 50 of them individually and store them in tar files. The images are not serially named. How to use write a bash script which does this job?
Pradeep BV's user avatar
0 votes
1 answer
305 views

How to use this command line in Ubuntu

I ask my question in the form of an example ... I have a folder containing several subfolders that are as follows Main folder==)Got, Vikings, etc. In each one there is videos with their corresponding ...
Hadi's user avatar
  • 3
1 vote
1 answer
1k views

Avidemux 2.7.3 (ubuntu/mint) Works from QT5 GUI, Fails from Jobs GUI [closed]

I opened Avidemux 2.7.3 GUI (Latest version in the Mint/Ubuntu repo) queued several videos I wish to convert from various formats. I could 'save' the file in the GUI. Conversion worked great, as ...
Kenny Parnell's user avatar
1 vote
0 answers
255 views

report shell script to count and sum from csv files

I need to create a report file from csv files. I have 160 devices named like MR001 to MR160, there is a folder for each one, all the folders have a unique ID that start with 4, and there is a csv ...
optimuspab's user avatar
1 vote
1 answer
936 views

How can I write a script to create a queue to submit jobs for terminal

I have several input files for a program installed in my ubuntu, I can do it manually and put keyword teste.in But since I have a really large number of files all with different names I would like ...
user avatar
0 votes
2 answers
283 views

counting number of three digit numbers in a text file

I have a text file with hundreds of three digit numbers. For example: 0 2 3 0 2 3 0 2 9 0 3 9 0 9 2 0 9 2 0 9 9 1 2 2 1 2 2 1 2 2 1 2 9 1 2 9 1 3 3 1 9 2 1 ...
Moe Shii's user avatar
1 vote
0 answers
355 views

How to transition smoothly and repeatedly between two videos using a command line tool?

I want to output a video using two videos as input, where these two videos fade into each other in a smooth and repetitive manner, every second or so. I believe a combination of ffmpeg with melt, ...
Lichtung's user avatar
0 votes
1 answer
53 views

Can I use a list of file names that I saved to file to have each file on the list copied/moved/deleted?

How can I use cp rm or mv commands to manipulate files saved to a list, for example one made like so: ls Downloads/ | grep example > example.tmp The point is to be able to view/edit the file list ...
Rulent's user avatar
  • 9
1 vote
1 answer
1k views

How do you bulk move files into folders corresponding to the name of each file?

I have several movies in a folder. For example: ~/Downloads/Movies/Movie A (1998).mkv ~/Downloads/Movies/Movie B (1999).mkv ~/Downloads/Movies/Movie C (2000).mkv I would like to put each file ...
Martin JS's user avatar
1 vote
1 answer
1k views

How to batch watermark images with an unique identifier?

I know how to use BIMP in GIMP, but I have 20 photos that I want to batch watermark them with different letters A-Z or different numbers 1-20. So one photo is A the other B and so on.
peteubuntu's user avatar
0 votes
1 answer
114 views

Batch low quality compress +1TB of images and videos in multiple folders

I have over 1TB of images and videos spread across multiple folders (personal photos and videos, from the last 15 years) and I wanted to back them up but I don't need them to be stored in high quality....
dult.np's user avatar
0 votes
1 answer
554 views

Batch Libreoffice Writer file modification

When a family member started using Libreoffice Writer on Ubuntu they used a particular document over and over as a starting point for new documents. Subsequently these documents were themselves used ...
Organic Marble's user avatar
4 votes
2 answers
849 views

For each file in a directory, pass it as an argument to an image viewer [duplicate]

I have a directory with a bunch of .dcm files (they are medical scans) that looks like this: J6071c1.dcm J6071d7.dcm J6071ed.dcm J607203.dcm J607219.dcm J60722f.dcm J6071c2.dcm J6071d8.dcm ...
jamesh625's user avatar
  • 205
4 votes
3 answers
5k views

Extracting rar files having the same password

I use unrar to extract rar files on Ubuntu 18.04. How can I extract 100 files that have the same password without giving the password 100 times. I hope I can do it on Nautilus, also terminal is fine.
Ives's user avatar
  • 1,153
0 votes
1 answer
1k views

How to include directories and subdirectories in a batch file

I found a batch file script to do the job I need to do. I posed the question of how to add directories and subdirectories recursively in the batch process in a comment on the post I got this code from,...
TheMegolith's user avatar
1 vote
1 answer
208 views

How can I rename a directory tree to match a tree saved in a file?

I have an old directory-tree-file created using find . -type d >old.txt. Now I want to rename an existing tree that has the same exact structure to mach the old tree. This question is related to ...
alien250's user avatar
  • 125
-2 votes
1 answer
565 views

Audacity command line batch tempo modification

I am using Audacity to speed up my podcast in order to save time while listening to them in the car. Is it possible to create a batch which assigns a given speed (e.g. 30) to all files in a folder?
Johann Luyat's user avatar
32 votes
3 answers
281k views

How do I create a batch file and run it? [duplicate]

should I use the text editor? the extension should be .sh or .bat?
Sange's user avatar
  • 321
3 votes
1 answer
4k views

How to extract first file from cbz files in one batch?

I have a collection of comic books that I store on my computer, mostly in .cbz format (which is just a ZIP archive, but with a fancy name). Recently, I decided to make a collage of the covers of a ...
Gallifreyan's user avatar
2 votes
1 answer
4k views

Bulk image format conversion from from .bmp to .jpg via command line? [duplicate]

My screen capture program saves .bmp images, which are not usable in Google Docs, which will accept .jpg Is there a clever way to create a set of .jpg from the .bmp files via the command line? Bonus ...
gatorback's user avatar
  • 5,735
14 votes
1 answer
44k views

How to decode an image string using base64 in command line?

Say I have an image image1.jpg I can encode it using base64 tool : myImgStr=$(base64 image1.jpg) I tried to decode it using the following command: base64 -i -d $myImgStr > image2.jpg or echo -...
user avatar
11 votes
2 answers
32k views

Rename multiple directories in the command line

I have some folders called: Session 1 Session 2 Session 3 Session 4 Session 5 Session 6 Session 7 Session 8 I would like to rename them all to: Folder 1 Folder 2 Folder 3 Folder 4 Folder 5 Folder 6 ...
Rtsne42's user avatar
  • 1,207
-1 votes
2 answers
2k views

Using txt file to download the File from FTP location in Batch Mode capability

I need help regarding downloading the files from FTP Server to the Local Server. for downloading i need to use the FTP In batch Mode capability and I have a txt file with with all the files which ...
kunal's user avatar
  • 442