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 vote
2 answers
334 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
58 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
73 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
30 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
  • 2,734
0 votes
1 answer
45 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
577 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
246 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
801 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
134 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
87 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
1k 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
  • 173
2 votes
3 answers
381 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
214 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
0 answers
357 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
  • 155
-1 votes
1 answer
56 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
1 vote
2 answers
441 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
612 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
0 votes
0 answers
15 views

Can't rename or delete files on my other partitions [duplicate]

I am an absolute beginner, I'vs just installed ubuntu on the partition that I have Windows 10 on (after formatting it), during the installation process I didin't erase the whole disk bc I didn't want ...
Suhail Mahmoud's user avatar
7 votes
1 answer
525 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
2k 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
129 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
69 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
59 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
669 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
65 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
0 votes
0 answers
34 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
61 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
102 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
91 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
99 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
225 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
699 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
586 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
415 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
1k 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
254 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
1k 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
391 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
0 votes
2 answers
2k views

remove certain special characters from file names

I am having an issue transferring folders to my external hard drive- I dont want to change formatting on the HD. So there are 100's of files in the folder, and the error preventing me from copying ...
daryl's user avatar
  • 3
1 vote
1 answer
66 views

Rename a character in various filenames inside a subfolder of a folder

I am a noob, I have accomplished various things on the cli, however I haven't been able to rename some files Let me explain with an example. I have this: folder/ subfolder/ fileto_rename....
Raul Valera's user avatar
0 votes
1 answer
345 views

Using Rename program to delete last characters before file extension

1.What command do you use to delete the last 'n' characters before an extension? 13354443_Walkinthepark-ASGDFSGDG.mkv to 13354443_Walkinthepark.mkv How to delete the first 'n' characters before and ...
JohnJones's user avatar
0 votes
2 answers
40 views

Use rename of unknown string length

I have some files "file 1 [EN MR RE EF SF DS DE].txt" "file 2 [EN MR].txt" "file 3 [EN MR RE EF].txt" Id like to use rename to remove the [ * ] section. I've tried: ...
acrobaticitron's user avatar
2 votes
1 answer
1k 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
0 answers
409 views

Using Caja file manager on Ubuntu MATE, and every time i rename a file and push the right arrow key, i get moved back to the first file in the folder?

I'm renaming a lot of files, and anytime I finish typing the name and hit enter and right to go to the next file, I go back to the first file in the folder. Is this a bug? EDIT: Ubuntu 20.04.1, MATE 1....
swilly97's user avatar
1 vote
1 answer
2k views

How to rename files keeping only the last N characters

How would I recursively rename Bluebellgray 19707 Rug P1.jpg Bluebellgray Amal 1972407 Rug R1.jpg Bluebellgray Random 1907 Rug R2.jpg Words Amal 1707 Rug R3.jpg Whatever 9707 Rug R4.jpg to P1.jpg R1....
Ben Rich's user avatar
1 vote
3 answers
388 views

bash, files, rename files, switch positions

How to rename sluno-20201027-call-metroua-status.mp4 sluno-20201103-call-deriva.mp4 sluno-20201103-call-metroua-status.mp4 sluno-20201105-call-makrocz.mp4 sluno-20201105-call-metroua-testcall.mp4 ...
genderbee's user avatar
  • 830
0 votes
2 answers
1k views

How to add single quotation marks in the rename command to change the file name?

I am renaming a text file from Programmer.txt to Programmer's File.txt using the rename command in the terminal. I tried the following command: rename 's/Programmer/Programmer's\ File' *.txt But it ...
Sayak China's user avatar
0 votes
3 answers
425 views

rename folders by removing substring

I have a list of folders video_0001 video_0002 video_0003 ... How do I rename them all to 0001 0002 0003 ... ? I tried mv video_{0001..0003} {0001..0003} but it does not work
Kong's user avatar
  • 1,121
-1 votes
1 answer
157 views

Rename bulk files

I need to rename the '*.mp3' songs but I don't know how to change name for each and every song in a directory. Does anyone know how to do it? I need to rename my .mp3 files like this: Aaaa.mp3 Aaab....
Raj's user avatar
  • 23

1
2 3 4 5
7