Questions tagged [batch-rename]

Batch renaming is a form of batch processing used to rename multiple computer files and folders in an automated fashion

Filter by
Sorted by
Tagged with
-1 votes
1 answer
108 views

Rename and add a number to all folders in a directory

I have a simulation folder on hpc which contains time directories from 0 to 50 with a step of 0.1 (so 501 folders in total with their names as 0, 0.1, 0.2.. and so forth). Example output of ls: 0 0.1 ...
rku's user avatar
  • 13
2 votes
1 answer
92 views

How can you create multiple folders with names that are altered versions of the names of existing files?

I have approximately 100 files with the file names such as: "1999 - Film Title.avi" & "2025 - Another Film Title.avi", etc. I would like each of these files to be moved to an ...
Diffusive9076's user avatar
2 votes
1 answer
90 views

How to remove/add/replace numbers from multiple filenames?

How to remove and add numbers from multiple filenames? For example, I want to change the names of filenames Apple1.sh and Banana2.sh to Apple.sh and Banana.sh I have googled this for a while but I ...
God of Money's user avatar
2 votes
1 answer
488 views

How to batch rename files (images) recursively based on CSV file

before writing this post, I obviously searched the internet and found several solutions that could perhaps work. But I'm a complete newbie to command line programming or writing. What I have : ...
djinnroh's user avatar
4 votes
2 answers
1k views

How to mass change many files names using find and mv

I have a lot of files in many directories that are wrongly spelled. They are spelled Localisation.json and I want to change them to Localization.json. I tried this, but it does not work: find -type f -...
Fatemeh motlagh's user avatar
0 votes
0 answers
94 views

Rename files from different directories with their paths

I don't know if I'm making sense but, this is roughly what I'm dealing with, and just in case I'll include that some folders have .jpg in the name: Photos$ tree . ├── 1 │   ├── 1.jpg │   │   └── X │   ...
killmenowplease's user avatar
0 votes
2 answers
85 views

Rename files matching expression

I have to rename a lot of jpg files like Portrait_14-9-100390.jpg to Portrait-9-100390.jpg,i.e. remove _nn part. I did that with a dumb shell script : sudo rename -f -v 's/_20//' /var/www/prod/110253/...
Mitsu Tomoe's user avatar
0 votes
2 answers
371 views

What is the command or script to add a part of folder name of that folder's filename?

Suppose I have folder structure like below 01. folder1 |- 1. video1 |- 2. video2 |- 3. video3 02. folder2 |- 1. photo1 |- 2. photo2 03. folder3 |- 1. doc1 |- 2. doc2 Now I want to ...
Shezan's user avatar
  • 425
1 vote
1 answer
698 views

Split folder into subfolders with the name of that subfolder dependent on file name prefix

I have a folder with 8857429 files stored within it. Each file follows the same naming structure: "{GROUP}-{UNIX TIMESTAMP}" I want each group to have its subfolder containing all files that ...
stefano's user avatar
  • 13
2 votes
3 answers
2k views

Removing a variable pattern from the title of my files

As I finally received data from NGS sequencing, for some days I used Ubuntu to analyse them. However, I lack the basics of shell coding, and I feel overwhelmed by this whole new language. I managed to ...
Hervé Terrinère's user avatar
0 votes
1 answer
531 views

How to rename multiple file extensions in ubuntu 20.04 terminal?

I have hundreds of files without extension that I'd like to add a ".py" extension to all of them. As you can see manually renaming them one by one is a time consuming process. I think there ...
Naeem Navjivan's user avatar
0 votes
0 answers
81 views

How to rename list of files to a partial same name plus numbered sequence before extension

mv MIPS_236_CONTROLLING_HIGH_BLOOD_PRESSURE_CA_20221701_Denominator_P1_1.csv ../MIPS_236_CONTROLLING_HIGH_BLOOD_PRESSURE_CA_20221701_Denominator_1.csv mv ...
Fernando Olvera's user avatar
0 votes
1 answer
80 views

How can I rename files by switching the order of strings inside the filenames?

I think the title is not clear, English is not my first language, sorry. But I hope you get the point with an example. I have a lot of files like this : (Name of Composer) Title of song - Name of ...
Colar's user avatar
  • 184
3 votes
2 answers
5k views

How to remove a specific part of the file name from a lot of files

I have an old backup from a windows pc, but most of the files have a timestamp at the end. All the files need to keep their original name, but without that timestamp. How do I remove a specific part (...
Tjeard's user avatar
  • 53
2 votes
2 answers
882 views

Find all files with given extension in subfolders, and add substring corresponding to subfolder

I have numerous txt files, scattered across different folders. - case1 | - 0.25 | - case1.txt - 0.35 | _ case1.txt - 0.30 | _ case1.txt -...
DeltaIV's user avatar
  • 285
1 vote
1 answer
72 views

how mass rename files with the following syntax

I have about 130 images in the following syntax: image100.jpeg image101.jpeg .... image1.jpeg image20.jpeg image21.jpeg .. image2.jpeg and so on. I want rename with the following syntax because I ...
Lews's user avatar
  • 342
0 votes
1 answer
405 views

How to shuffle files and rename sequentially

I have a set of .png images, currently named in sequence from 1 to 1000. How can I take these images and reassign them to a random number between 1 & 1000 so I end up with the same range of ...
wes.p's user avatar
  • 1
1 vote
2 answers
252 views

How to find and rename files with different extensions

I have some files inside a folder like this: DUMAK011.618 DUMAK011.619 DUMAK011.620 I would like to rename them to: DUMAI011.618 DUMAI011.619 DUMAI011.620
Janchi Garcia's user avatar
4 votes
2 answers
975 views

Install Bulky (Nemo bulk renamer)

I can not figure out how to install the new feature that is coming to Linux Mint 20.2. The bulk renamer Bulky (https://github.com/linuxmint/bulky). Because it's such a new thing, i can't really find ...
d_araujo's user avatar
2 votes
3 answers
518 views

How to batch rename sequentially prefixed numbers to new sequential prefixes via terminal?

How can I batch rename, using the terminal, a set of files where multiple numbers share the same prefix so that all those prefixes are set to new ones? For example: 011.foo.txt -> 001.foo.txt 011....
io4250's user avatar
  • 23
0 votes
2 answers
887 views

How to sort files into directories and subdirectories by name?

I'm new to ubuntu and also to the programming world, and I don't really know how to do this! I have a folder with lots of files named as follows: 000_S_001_mpc_asd.json 000_S_001_mpc_asd.nii ...
Al_Mt's user avatar
  • 3
4 votes
4 answers
717 views

Swapping one character in filename with another

I have a file that has the name a_b-c-d-e-f.txt. I would like to take that current name and swap the dashes and underscores so that it becomes a-b_c_d_e_f.txt. My intuition tells me to try rename or ...
German Barcenas's user avatar
1 vote
1 answer
553 views

Rename multiple files with same digits after decimal

I have multiple files with names vort-0.01.txt, vort-0.02.txt, ... vort-0.1.txt ... vort-0.2.txt ... etc. I want to rename each files with two decimal points i.e. I want to change the name of vort-0.1....
Hiranya Deka's user avatar
0 votes
1 answer
545 views

Bash Script to rename or remove punctuation (? !) & string in filenames of files, subdirectories and directories recursively in Ubuntu 16.04

I am new to using Bash scripting, but I have discovered a few solutions that use it to either remove or rename the filename for files within directories and sub-directories in Ubuntu 16.04. For ...
kjyon2's user avatar
  • 21
2 votes
1 answer
603 views

Batch rename of video files after finding its resolution height

Trying my first script, not going smoothly. Maybe someone knows of a program or can help point in the right direction. I want to sequentially find a large archive of video files resolutions - height ...
user209405's user avatar
0 votes
1 answer
781 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
  • 323
3 votes
2 answers
2k views

How do you rename files from one incrementing pattern to another?

I have a group of files that are named as follows: 048. banana.mkv 049. apple.mkv 050. mango.mkv 051. pear.mkv 052. grape.mkv I need to rename those files with the following naming convention 01. ...
GooberHimself's user avatar
1 vote
2 answers
91 views

Rename files from their content

I have thousands of txt files with a .pdbqt extension in a directory named 100000cpds_ligand_00001.pdbqt, 100000cpds_ligand_00002.pdbqt, 100000cpds_ligand_*****.pdbqt and would like to rename them ...
Stephan's user avatar
  • 13
3 votes
3 answers
913 views

renaming file and deleting from last

what is the "command line" "to remove certain character from the end of a file name . For example, subash.jpg.jpg. I want to remove ".jpg" from last. i have been having problem "renaming the files".
Subash Pyakurel's user avatar
0 votes
1 answer
872 views

How to rename the output file with variable name?

I want to run a script 4000 time, every time it produces an output file named min1.gro. Each time it will replace the previous version. I want to name the output with a different name for the 4000 ...
Mohamed Abdelaal's user avatar
2 votes
1 answer
1k views

Rename files of the same name in multiple subdirectories

I have multiple directories with unique identifying names. Within each of these are further identicle subdirectories generated by an automated analysis software. Within one of these subdirectories is ...
AleksDuv's user avatar
0 votes
2 answers
215 views

Change duplicated extension of multiple files recursively from the command line

My question is almost the same as those, however, its solution doesn't work my for my case. I'd like to remove duplicated extension (in my case .zip.zip) and have only one (i.e. .zip). I tried: ...
menteith's user avatar
  • 261
2 votes
1 answer
673 views

Specify starting number when renaming multiple files

I would like to rename multiple files with automatic numbering order. I can do this where the numbering starts at 0 (see screenshot) but I would like to specify the starting number. Is there a way to ...
Al Lelopath's user avatar
2 votes
3 answers
878 views

Replace a folder name using a contained file name

I have a thousand or so folders having random names. Every folder has at least one file with avi, mkv,srt or mp4 extension. I intend to replace the random generated folder name by the first file name (...
Vidal's user avatar
  • 97
13 votes
6 answers
7k views

Rename multiple files at the same time

I have around 180 files with the same structure: 000-aaaaaaaa.txt. Regular expression for a file name: /^[0-9]{3}\-[a-zA-Z]+$/gi (3 digits + - + letters + .txt). I would like to cut of the numeral ...
Max Mikhalchuk's user avatar
0 votes
1 answer
125 views

Bash : rename files (1 per folder) with folder's name

I have a folder with 101 subfolders. Here is a tree with the first ones to visualize the thing: ├── 001 - Implacablement votre │   └── Implacablement votre - Sapir.epub ├── 002 - Savoir, c'est mourir ...
Colar's user avatar
  • 184
2 votes
1 answer
234 views

How to save multiple image attachments from Gmail using specific name

I have an email (Gmail) with multiple image attachments that I would like to save to one of my folders. I know you can do "Download all attachments" using Gmail, but I would like to give my images a ...
An Ignorant Wanderer's user avatar
6 votes
1 answer
590 views

Swap parts of filenames

Problem I have thousands folders, which names are structured like: firstName_lastName_date for which I want to swap the two first parts using the underscore _ as a separator in order to end up with: ...
s.k's user avatar
  • 1,200
2 votes
1 answer
1k views

Find and replace folder and file names with Windows incompatible characters

My Ubuntu (18.04) drive is synchronised with a Windows drive. Some of my folder and file names in Ubuntu contains characters not allowed in Windows and this causes issues during sync. I want to find ...
Jaydin's user avatar
  • 1,298
1 vote
1 answer
503 views

Copy all files from subdirectories and subsubdirectories to main directory with modifying file names by adding prefix of all parent directories

Following these two posts: Move files to parent directory, prefixing file name with former subdirectory name recursively add directory name to file name I would like to do the same but with copying ...
Mostafa Hussein's user avatar
1 vote
1 answer
117 views

adjust character order of file names (batch)

I have several files named by date and I am trying to make a batch change in naming they look like this: dd-mm-yyyy or dd.mm.yyyy or ddjanyyyy and I'm trying to standardize everyone like this: ...
Rafael's user avatar
  • 105
2 votes
1 answer
238 views

rename the last number-string [duplicate]

How to rename the last number-string it finds with a zero-padded version and leave the rest of the filename alone? AAA 2000-01-03 bbb 2001-03-04 page_1.pdf To: AAA 2000-01-03 bbb 2001-03-04 ...
Rafael's user avatar
  • 105
1 vote
1 answer
4k views

How do I remove special characters from file name with a command?

I have a few files that I want to rename and want to accomplish this in the command line. I need to remove these characters "¡¿" from the beginning of the file names. From this: ¡Tú_la_llevas!-2018....
graveangel's user avatar
-1 votes
2 answers
234 views

Finding the image file name and renaming with parent folder names

I have this file structure. I wanted to use the image filename appended with the parent folder names. Before: ├── ak │   ├── adak │   │   ├── Hello\ World456 │   │   ├── cup-printing │   │   │   └─...
Suresh Kumar Gondi's user avatar
1 vote
1 answer
109 views

How to rename multiple files by year to year basis in bash

I have multiple files named as DOWN_1981_1.31.nc DOWN_1982_1.31.nc ... DOWN_2010_1.31.nc I want to rename them to DOWN_2040_1.31.nc DOWN_2040_1.31.nc DOWN_2041_1.31.nc ... DOWN_2069_1.31.nc How to ...
user962808's user avatar
1 vote
1 answer
146 views

How can I rename image file based on colors in the image?

For example: If I have a 2x2-pixel image. In the image: 3 pixels are red. 1 pixel is green. 0 pixels are blue. I want to rename the image to 3_1_0.
user avatar
0 votes
3 answers
715 views

Bulk change file extensions [duplicate]

I have a folder with ~30 files. The are already BitTorrent metafiles that lack a .torrent suffix. I want to change all those files to .torrent files. How would I do that? In windows it was as easy as ...
mjmike mike's user avatar
2 votes
1 answer
333 views

Easy way to add a zero to the filename if it need it

With big help from here, I have soon converted all my jpg files to gif (thanks again ALOT) but when I was looking around at my files I have noticed that some folder I have added a zero to the ...
Cazz's user avatar
  • 145
2 votes
2 answers
1k views

/usr/bin/rename: Argument list too long

I'm trying to rename a bunch of files and folders. I tried this command rename 's/test/test2/' but I got unable to execute /usr/bin/rename: Argument list too long I searched a lot and tried ...
Kulcanhez's user avatar
2 votes
3 answers
3k views

Renaming multiple files at once, with the same extension [duplicate]

I'm currently in a situation, where I need to rename a bunch of files, inside different folders, with the same extension (SRT). Currently, my directory "setup" is like this: This is a folder (2000) ...
SDXCPTDR's user avatar

1
2 3 4 5