Questions tagged [rename]

this is a perl tool that can be used to rename several files using Perl expressions. If you will ask about renaming several files, either use the filemanager you are using, ie. Nautilus, Nemo or the command-line tags.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
95 views

I renamed music folder to some other name

Hi all I renamed the music folder and suddenly I saw Home directory missing. I restarted the ubuntu, then some file system checks going on which are never ending. Please help me: Details: Ubuntu 23.10 ...
Ekaveera Gouribhatla's user avatar
0 votes
0 answers
32 views

Can't rename folders with KDE Dolphin [duplicate]

When I try to rename a folder by changing the case (like changing it from /mnt/share/folder to /mnt/share/Folder) in Dolphin by either highlighting the folder name and pressing F2, or right-clicking &...
raphael75's user avatar
  • 345
3 votes
3 answers
491 views

Remove apostrophe from multiple filenames

I'm new with Linux and I have the following problem. I have several different filenames like: 'Name1.mp4' 'Name2.mp4' ... I would like to have the apostrophe ' removed from the filenames. Meaning, in ...
Ralf Hütter's user avatar
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
0 votes
1 answer
85 views

Rename images/ files recursively?

How can I rename images/ files recursively? For example: folder - subfolder1 - a-copy.jpg - subfolder2 - b-copy.jpg - subfolder3 - c-copy.jpg I would like to get: folder - subfolder1 - a-...
Run's user avatar
  • 2,619
0 votes
1 answer
92 views

Find images recursively, copy, rename, and resize?

How can I find images recursively and copy them into their own directories with new names? For example: folder - subfolder1 - a.jpg - subfolder2 - b.jpg - subfolder3 - c.jpg So I can get: ...
Run's user avatar
  • 2,619
0 votes
2 answers
173 views

Renaming folders and removing all characters after '(' in linux

I have folders with album year and a bunch of text I don't care about and want removed/renamed. Here is what I was trying for the below files: Calvin Harris - This Is What You Came For (2016) [MP3-320]...
Kylo Ren's user avatar
0 votes
0 answers
157 views

rename file with name contains variable part

If i have file name (file_$i.txt). How I can change variable part in the name to be (file_$var.txt) $i >> number of lines in file $var >> content of other file
Amany Abd Elmnem's user avatar
5 votes
3 answers
1k views

Copying files to directories according the file name

I have a webdav server containing thousands of files: └── Sync ├── 20180719_120823.jpg ├── 20180719_120933.jpg ├── 20190719_120955.jpg ├── 20190719_121023.jpg ├── ...
carnock's user avatar
  • 121
-1 votes
1 answer
174 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
4 votes
5 answers
1k views

Batch renaming files, moving two specific words from filename to beginning and removing last part

I have a bunch of videos in a folder that all end with a random code between square brackets i.e. [_qj3ZkAR2tE], and right before this part, there's two words I want to move to the beginning of the ...
Leifrstein's user avatar
0 votes
0 answers
100 views

Ubuntu added a 1 at the end of my hdd names after upgrade(i think)

Can someone explain why my hard drive names suddenly appended a 1 at the end of the name? Details: im using an old pc as a jellyfin server, running 20.04. No raid, jbod - Total of 11 disks, all ...
erevos moonbeam's user avatar
1 vote
2 answers
503 views

Changing a folder name that has a space in it [duplicate]

I need to Change a folder name Word Press into wordpress. It gives an error because I have mistakenly written the folder name in two parts, which is not recognized as one name. What can I do terminal ...
babs's user avatar
  • 19
0 votes
0 answers
308 views

rename command fails saying file exists when it doesn't

I needed to change the case of filename extensions and used this command in a directory of 26 WAV files: rename 's/.WAV/.wav/' *.WAV It worked successfully. I then changed to a different directory ...
user3261738's user avatar
2 votes
1 answer
199 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
0 votes
1 answer
86 views

How to change name of DVD directory

I had K3b burn some data to a rewrite-able DVD. My file manager shows it as "K3b data project" I want to rename it to a sensible name like DVD_Disk. sudo mv '/media/andy/K3b data project' ...
fixit7's user avatar
  • 3,117
0 votes
1 answer
145 views

Remove characters from file name - between [ and ]

i download videos from YouTube for my hobby. The filenames contain some random characters between the [ and ]. E.g. filename [vbnghztresku].webm. My partial solution starts as follows: find /medien -...
Bleckie's user avatar
2 votes
1 answer
1k views

How to rename multiple files and folders recursively that include * and other symbols not valid for filenames/folders? [duplicate]

For somewhat reason, my Ubuntu Mate 20.04 let me include * and other symbols apparently not valid for a filename or folder. But now I need to copy a lot of archives (like 15,000) to another PC. I don'...
Silver's user avatar
  • 21
1 vote
0 answers
742 views

Changing the name of a USB device

I did a search and came up empty so here I am. First of, I'm new and old to Ubuntu/Linux. What I mean is I've used it on and off for years, but at this point I feel like I know about as much as a ...
Narrows Gaming's user avatar
6 votes
4 answers
1k views

Renaming files with a year prefix from the beginning of the filename to the end

Extreme novice here attempting to figure out how to rename a bunch of files in a directory. I have hundreds of media files that all follow the same syntax for the file name: year - title of movie.avi ...
Zachary Sycks's user avatar
0 votes
0 answers
270 views

rename multiple subfolders (not files) to parent directory name

I've searched for a solution for this, but everything I found relates to renaming files in a subfolder. I want to rename only the subfolders in multiple directories to the names of the parent folders ...
delta1071's user avatar
0 votes
0 answers
99 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
5k views

After upgrade of ubuntu network interface names changed, why? How to change back?

After an upgrade from 18.04 to 20.04 I found all the network interface names changed. Why? And how can I change them back to their original names without having to edit netplan files to force a name.
Dave's user avatar
  • 193
2 votes
3 answers
823 views

Renaming multiple files by removing a single number (1 & 2) in each file [duplicate]

I have approx 200 files named in the format: paired_dat_11_R1.fq paired_dat_12_R2.fq paired_dat_121_R1.fq paired_dat_122_R2.fq paired_dat_851_R1.fq paired_dat_852_R2.fq I just would like to rename ...
veridian21's user avatar
0 votes
1 answer
447 views

Renaming mounted folder gives "Permission denied"

I have 5 different drives in my PC which are located at /home/mnt/FOLDERS and are by default labelled alphanumerically. Now I want to rename them and I tried using mv, rename, sudo commands, which ...
Sunil's user avatar
  • 19
0 votes
1 answer
748 views

gparted label file system greyed out

I bought a new SSD hard drive recently to use as a backup, and when I mount it to my machine it shows up mounted at /media/[USER]/Extreme SSD/ <-- yes, that's a space there. I hate having spaces ...
Jabber1's user avatar
  • 335
-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
5 votes
2 answers
7k views

How can I change the name or icon of an installed application?

I have two MPV media players installed of different versions. One is via apt and another via flatpak. I need them both for different purposes. But they have exactly same name and icon. So, whenever I ...
Vin Raghav's user avatar
1 vote
1 answer
1k views

Remove characters from multiple file names

I have loads of files with file names that I need to simplify. I need to keep everything before the first _ , and the _R1/R2 bit. A10_S65_L001_R1_001.fastq A8_S49_L001_R2_001.fastq ...
Buffy's user avatar
  • 11
7 votes
1 answer
644 views

Ubuntu 22.04 Chrome cannot rename filename when saving images

Ubuntu 22.04 using Chrome, I select an image, R-click, Save As Image The dialog pops up with the suggested image name Previously, I had already copied some text to use as the new image name, however, ...
user3560415's user avatar
0 votes
1 answer
3k views

how to remove a substring of characters from filenames in a directory?

I know similar questions have been asked before but I couldn't find a thread that addresses the 'position' (1 to 5) to be replaced. What is the best way to remove a number of characters from file ...
Fred Philip's user avatar
1 vote
1 answer
193 views

Shared Access and LG Smart TV 766PA?

The Videos directory contains files 1.mkv 2.mkv and so on. When trying to share them inside the local network on LG 766PA, the file names become very strange, not the ones I did. Instead of 1.mkv, ...
arklight's user avatar
0 votes
2 answers
91 views

Ubuntu unicode directory name starting with backslash renaming

How can I rename a folder with the name \316\234aintenance under the Ubuntu terminal?
Maverick's user avatar
  • 101
0 votes
0 answers
70 views

Rename files and move to parent directory and delete empty subdirectories

ls */*/* The output of the above command is shown below: HP14_107_Ch/10785/outs: metric_summ.csv HP15_746_Ad/10746/outs: metric_summ.csv HP16_317_TD/10787/outs: metric_summ.csv I want to rename ...
botloggy's user avatar
  • 101
0 votes
1 answer
822 views

A bash script to rename files from different directories at once

If I have a directory named /all_images, and inside this directory there's a ton of directories, all the directories named as dish_num as shown below. and inside each dish directory, there's one image ...
Abanoub Asaad's user avatar
0 votes
1 answer
93 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
  • 194
0 votes
0 answers
44 views

Overwrite FS properties with the EXIF props

I currently have some files that are working and displaying the correct properties from the FS. But some are showing incorrectly when trying to order by date. As the date is showing as "Unknown&...
Jamie Hutber's user avatar
1 vote
1 answer
78 views

How to rename files: picture.jpg.~1~ to picture_~1~.jpg [duplicate]

I have say 30000 files of this type: picture.jpg.~12~ They are remnants of a backup (mv -v --backup=numbered ...). I needed to switch the extensions to: picture.~12~.jpg
xerostomus's user avatar
2 votes
1 answer
164 views

Rename some files to their own name + something else

I have a directory like Photo and I want to change the names of the directories inside it -> to what they are, but without it [www.faraDa...] like the first one that I change by mv command. but I ...
Sir-Sorg's user avatar
-1 votes
1 answer
122 views

Rename files so that it only contain numbers

I have a bunch of files that looks like this: [Skymoon Raws] Mushoku Tensei - 06 [ViuTV][WEB-DL][1080p][AVC AAC].mp4 [Skymoon Raws] Mushoku Tensei - 07 [ViuTV][WEB-DL][1080p][AVC AAC].mp4 And I want ...
Assplayer's user avatar
0 votes
1 answer
207 views

Rename using both captured groups and other variables

In this question I understood that we can only refer to captured groups in the rename command using single quotes. Is there a way to use both captured groups and other variables in the same rename ...
Pedro Miguel Silva's user avatar
1 vote
2 answers
360 views

Is there a renaming tool (for Ubuntu 18.04 Mate) which is able to work on folder names as well?

I am rather new to Linux, I am using Ubuntu 18.04 Mate. When I need to do more complex file renaming tasks I prefer to use KRename (the GUI version that got installed with apt-get). But often I'd also ...
Shakesbeer's user avatar
5 votes
2 answers
854 views

Renaming a file using a name of another file in the same folder

I have a thousand folders containing two files: one of them with a random name (mp4 extension) and the other with a name (srt extension). I intend to replace the random generated file name by the ...
Vidal's user avatar
  • 97
0 votes
2 answers
61 views

Relable Icons in Software Application Dsiplay

When I Click the Software Application Icon the display shows 7 Icons with the label 'LibreOffic...'. How can I change the lables to clearly show Writer, Draw, Calc, Math, .... Thanks
Sib Andela's user avatar
0 votes
1 answer
693 views

Remove today's date string from all filenames in folder

I have a folder full of jpegs formatted like this: 0001_20210516_XYZ.jpg 0002_20210516_XYZ.jpg 123_20210516_XYZ.jpg 01_20210516_XYZ.jpg and I want to rename all files so the date string in the middle ...
Pad's user avatar
  • 103
2 votes
3 answers
729 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
8 votes
2 answers
2k views

Search for file by the name it had before being renamed

I have some hundreds of thousands of files, personal stuff like photos, videos and documents gathered and stored during the years. Most of them are organized by type, dates and topics... But some (...
AmIanonIm's user avatar
1 vote
1 answer
274 views

Rename file names with a parent directory name

I want to rename my files recursively, ending with *.fna.gz with the parent directory two-step-up i.e. "Aspergillus_neoniger". You can see the subdirectories details in this image tree ...
shahzad's user avatar
  • 43
5 votes
1 answer
2k views

Remove and replace all Slashes from Filenames recursively

I want to rename every File in a folder-subsystem that contains a slash to be replaced with an underscore Current filenames example: Hello/there.txt File/name.jpg to Hello_there.txt File_name.jpg ...
Bob Ross's user avatar
0 votes
2 answers
584 views

Change name of folders recursively - Bash

I want to rename all files called Caudate_masks to lower case: caudate_masks. In my directory I have several folders, one of them called Controls and other one called Patients. Inside each one of them ...
RoyBatty's user avatar
  • 127

1
2 3 4 5
7