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
3
votes
1answer
53 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 ...
0
votes
2answers
40 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 ...
0
votes
2answers
39 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 ...
1
vote
1answer
54 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....
12
votes
2answers
1k views

how to rename applications in “show apps”, such as “GNU Image Manipulation Program” to “GIMP” 20.04.2?

How does one rename applications in "show applications", from, such as "GNU Image Manipulation Program" to "GIMP" in Ubuntu 20.04.2? I have searched the 'Net, and the ...
0
votes
1answer
34 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 ...
0
votes
2answers
21 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: ...
2
votes
1answer
195 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 ...
0
votes
0answers
69 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....
0
votes
1answer
136 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....
2
votes
3answers
350 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 ...
0
votes
2answers
173 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 ...
0
votes
3answers
43 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
-1
votes
1answer
108 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....
1
vote
0answers
16 views

How to configure autorenaming suffix when file exist

If you download a file ( to you're downloads folder , e.g) , and there's an existing file with the same name, ubuntu renames the new file with a suffix like original_name (2).extension Is there any ...
0
votes
3answers
182 views

How to rename archives in Ubuntu's terminal? [duplicate]

I have the following files: /home/wiki/15000_20000/xx00 /home/wiki/15000_20000/xx01 /home/wiki/15000_20000/xx02 ... /home/wiki/15000_20000/xx4686 How do I rename xx00, xx01, ..., xx4686 to 152000, ...
0
votes
0answers
30 views

Use command “rename” on nested folders with trailing whitespaces

I received great help in this thread about using command "rename" on folders with trailing whitespaces that are also in subdirectories. How to use the command "rename" on ...
0
votes
0answers
74 views

Force Copy with Ubuntu 20.04 GUI method

Just upgraded from Ubuntu 16.04 to 20.04. a couple of weeks ago. Mostly pretty good, but the file browsers are giving me big problems. I have a directory I wish to copy. In that directory are a number ...
2
votes
3answers
319 views

How to use the command “rename” on subdirectories as well

There is an answer that is very useful to me in this thread about renaming folders with trailing whitespaces: Remove Leading or Trailing Space(s) in File or Folder Names What I can't figure out how I ...
0
votes
1answer
26 views

How do I rename *.faa filenames for an expression located inside each file in [brackets]?

I would like to rename the filenames *.faa (a typical name is protein-176.faa) for a name that is located inside each .faa file in brackets [Escherichia coli DSM123]. For example the file protein-44....
0
votes
0answers
27 views

drive mountpoint automatic renaming

What is causing this to happen every few months? BackinTime: "Can't find Snapshots location!"
0
votes
1answer
41 views

How to rename with keyword / specific text in terminal?

I have a question, how do I just rename keywords? I have a very long file name. I am lazy to change it because I have to copy the name first. example filem87302839127921youtube90182mskldq7629121832....
7
votes
8answers
2k views

Renaming muliple files at once

I have a bunch of wav files I converted to mp3 files using ffmpeg. Now the mp3 files are all named file.wav.mp3. How can I remove the .wav suffix while keeping the rest of the file name? I would like ...
0
votes
1answer
48 views

is there something like brace expansion when using perl rename?

I have 100's of files that I want to remove the beginning numbers from. The files are named similar to below: 048banana.txt 049pear.txt 050watermelon.txt 051tomato.txt 062pepper.txt ...
1
vote
2answers
105 views

Specifying directory type when removing characters from directory name

I'm using the following simple line of code successfully to remove a specified word from all file names in a directory: for file in *.* ; do mv "${file}" "${file//UNWANTEDWORD}"; ...
0
votes
2answers
43 views

How to enumerate a variable in a loop starting at 01?

I have a question I have the rename command, but after I run the rename starting from 00, how to start from 01, please help me this is the command that I use for i in *.mkv; do new=$(printf "...
0
votes
1answer
238 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 (...
0
votes
0answers
50 views

Broken Dependencies/Root Perms

First off- I'm certainly new to Linux with zero programming experience and definitely jumped off of the deep end before I was able to float let alone swim. I did so intentionally knowing full well ...
0
votes
2answers
54 views

Copying and renaming files

I am trying to copy multiple files from separate folders and paste them in a new folder with new filenames. Can anyone help me with the same? For example: I have folder 1,2,3,4,5 and each one of them ...
1
vote
0answers
38 views

How can I return back videos which was removed? [duplicate]

When I rename "videos" folder, the videos in that have been removed.
1
vote
1answer
66 views

How to remove text from a folder name after a certain word

Need assistance trying to write a script/command that will clear text on a directory after a certain word, in this example download. Thought about using a for i statement but have had no luck. Example ...
2
votes
2answers
161 views

Rename multiple files with variable extensions to remove beginning and end of filename

I have multiple files I need to rename as below: 5891_1_0_AD3884_ACTCTCGA_S10.bam 5891_1_0_AD3884_ACTCTCGA_S10.bam.bai 5891_1_AD3875_GAGCTTGT_S1.bam 5891_1_AD3875_GAGCTTGT_S1.bam.bai ...
1
vote
2answers
89 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 ...
3
votes
2answers
163 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. ...
0
votes
2answers
62 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 ...
0
votes
1answer
230 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 ...
-1
votes
1answer
739 views

Copy and rename at the same time

I need to copy sample.txt from foo/ to bar/ and when pasting in bar/ that should be renamed as test.txt What is the command i need to use for this ?
0
votes
2answers
39 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: ...
-1
votes
1answer
767 views

How to remove unwanted text from file name using command line?

I have files needing renaming I want to create a .sh script for it, just a command line. I need to remove the unwanted things such as www.TamilRockers.ws, UNTOUCHED, ESubs, etc. I would like a .sh ...
2
votes
3answers
204 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 (...
0
votes
2answers
79 views

Problem rename multiple files

I try to rename those files with .txt extension using rename command: rename -n 's/new//' * ... the idea here is to change names of files to 1 , 2 ,3 and etc; and the output is: rename(new1.txt, 1....
5
votes
1answer
278 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: ...
0
votes
1answer
31 views

Find and remove common characters that should not be used in filenames and folders

Following on from this question- Rename files and folders in all sub directorys to remove character I would like to remove all common characters that can cause problems such as / \ : * ? " < > | ...
2
votes
2answers
243 views

Rename files and folders in all sub directorys to remove character

I have some files and folders that were saved in Linux on an external HDD, some of these files and folders contain the characters "::" I want to remove these characters from all files and folders on ...
0
votes
1answer
74 views

Traverse through all folders and renaming all files inside folder sequentially 1.*, 2.*, 3.*

This does not work... I am still rather bad with sh scripts. for imageFolder in *; do [ -d $imageFolder ] && cd "$imageFolder" && for file in *.* do ...
0
votes
1answer
169 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 ...
1
vote
1answer
687 views

How to make almost all Linux files management case-insensitive but its shell copy command 'cp', 'mv' to be case-sensitive?

How to make almost all Linux files management such as finding, auto-completion, etc, case-insensitive but its shell/Bash copy and move command 'cp', 'mv' to be case-sensitive?
2
votes
1answer
37 views

How to change several directories' names?

I have some directories whose names I want to change to {00..16}. $ ls 'FVSFT1092A' 'FVSFT1092I' 'FVSFT1092B' 'FVSFT1092J' 'FVSFT1092C' 'FVSFT1092K' 'FVSFT1092D' '...
1
vote
1answer
2k 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....
1
vote
2answers
1k views

How to remove end of file names?

I want to rename a lot of files like 1_16_video1.mp4?1578683110081 & 54_127_video7.mp4?168302 to 1_16_video1.mp4 & 54_127_video7.mp4. How can I rename them?

1
2 3 4 5 6