Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
1answer
34 views

Rename files by adding their parent folder name [duplicate]

I have a parent directory composed of a set of sub-directories. Each sub-directory is composed of a list of files. Here is the scenario: v_1: filenames.txt v_2: labels.txt v_3: coding.txt What is ...
-1
votes
3answers
68 views

How to rename many files using info from a separate .txt file?

I believe this problem can be solved with a bash script, but I'm still a beginner so I need your help here. I have many files (about 8 million!) with names such as IR.AZR..SHE.D.2016.001.000000.SAC. ...
0
votes
0answers
16 views

Renaming multiple files at the same time [duplicate]

I have a lot of files that contain a few things in their name that i want to remove. For example I have 78 Files with the name first(official).mp3, 2nd(official)Tutorial.mp3 ...... and so on till 78 ...
0
votes
1answer
20 views

Ubuntu 14.04.5 Audit mv Command

So when I run strace on mv, it shows that it calls rename. I'm not getting audit events for 'rename' system call. I think I know why and would like some help figuring out a solution. I have a bunch ...
0
votes
0answers
13 views

Bulk renaming the files [duplicate]

I need to rename the screenshot1.png...screenshot19 pattern like images to index1.png to index19.png , how to do this ? Can somebody help me out !!
0
votes
3answers
38 views

change all file names (prefix to postfix)

I have a directory containing thousands of files with names t_00xx_000xxx.png I want to change their names to 00xx_000xxx_t.png so take the prefix and put it as a postfix, can this be done in only ...
1
vote
1answer
59 views

Rename folder of files based on file content

I have a folder of markdown files - I need to batch rename THE FILES. I need to prepend a date, and the date is inside the file in this format: ---- Title: Title-of-blog-article Date: 2012-03-07 I ...
0
votes
0answers
47 views

Nautilus rename file after creation [duplicate]

Nautilus used to rename a newly created file (via New Document). So I could directly type the new Name. Since Ubuntu 17.10 it just creates a File with the name specified in the Templates directory. ...
3
votes
1answer
59 views

Change name of multiple files/folders under a directory

There are some files and folders containing the word apple. Like, Root directory = AppleWorld ->AppleStore -> apple.png, appleStore ->StoreOfApple -> apples -> peaches.png apples....
1
vote
2answers
104 views

Rename all Files and Folders - The Movie - Movie, The

I'm looking for a way to clean up my naming convention in my media folder. For instance rename The Thing (1982) |_ The Thing (1982).mkv to: Thing, The (1982) |_ Thing, The (1982).mkv I've found ...
3
votes
2answers
42 views

how to rename your drive?

I want to rename my drive located at /media/Lenovo Drive to /media/LenovoDrive so that ndk white space problem can be resolved ...please give me your suggestion....I am using ubuntu
4
votes
2answers
62 views

Rename multiple files mantaining order [duplicate]

I have a good amount of files I have to rename. My files are called sample_1.wav sample_2.wav ... I need to rename each one of them with a smaller number in the name, sample_1.wav has to become ...
-1
votes
1answer
320 views

Access denied to delete or rename a folder [closed]

I use Window10 and I have changed some permission of a drive for a user. It has created a folder with '....' name after these changes in my drive and I can't rename and delete it. What is the folder ...
1
vote
1answer
190 views

Set custom names for vmlinuz and initrd so multiple distros can share boot directory

I set up a triple boot system on btrfs, and have arch, xenial, and bionic like so: encrypted btrfs container each has a dedicated btrfs subvol for it's own root shared unencrypted /boot between the ...
0
votes
1answer
322 views

rename not working [closed]

I have a bunch of files with names like ... (Karton 1).jpeg and would like to rename them recursively to: ... (brauner Karton).jpeg I tried the following commands, which didn't work: rename -v 's/...
1
vote
2answers
382 views

How do I rename multiple files? [duplicate]

I have several files in the same folder that have one element in common in the names. How do I rename the files so that the common element in the names is deleted?
0
votes
0answers
68 views

Faster execution of renaming a lot of file names with command-line

Im using the following command to rename my file names in a huge folder with a lot of subfolders and files. It take some time to execute. Qustion: Is there a faster way to do the same? Thank you so ...
0
votes
1answer
71 views

Getting unexpected output from rename command

I have 1000+ images and I have to rename them all so I was first testing my command on 20 images. They are named as cropped1.jpg cropped2.jpg cropped3.jpg ... cropped20.jpg I want to rename them as ...
8
votes
3answers
2k views

Rename returns “bareword not allowed” when trying to lowercase parts of multiple filenames

I have two files in a folder on my Ubuntu 16.04: a1.dat b1.DAT I want to rename b1.DAT to b1.dat so I would have following files as a result in the folder: a1.dat b1.dat I tried (unsuccessfully): ...
0
votes
0answers
40 views

bash: how to replace recursively a pattern in filenames from current directory? [duplicate]

I'm looking for a command in bash which can do the following replacement. From: /path/filename.txt /path/subdirectory/otherfilename.txt ... To: /path/filenameOld.bak /path/subdirectory/...
0
votes
1answer
249 views

Rename file using regex

I've little issues trying to change the name of several amount file names using rename command. I have 1 main directoy, and so many others inside, after this, the whole content are .wav files. /...
-3
votes
1answer
143 views

Mass rename files in folder

I have in folder ca. 400 files every file have same extension .txt. I want to add to every file one word or sing more so example: stackoverflow.txt is normal. I want to have stackoverflowxx.txt. I ...
0
votes
1answer
43 views

Find a string in name and move at the of the of the name before the extension

i have many files in different subdir. I would like to rename all files named *-ABC-DE(7 numbers).ext to *-DE(7 numbers)-ABC.ext Is it possible?
1
vote
1answer
97 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 ...
2
votes
1answer
98 views

Recursively number directories

I have the following directory structure: $ directory tree Data Data ├── Mercury ├── Venus ├── Earth │ ├── Australia │ └── Asia │ └── Japan | └── Hokkido ├── Mars ├── ...
0
votes
0answers
24 views

How to rename bunch of files using bash commands? [duplicate]

I have list of files "ABC19955.gif, ABC19956.gif,......ABC19998.gif" I want to rename this as CN1.gif, CN2.gif.....CN50.gif Can anyone please help me to do this! Thanks in advance
0
votes
1answer
98 views

Rename files to match parent folder [duplicate]

I want to rename all files within a directory to match the parent folder's name. Now I've found several results that sort of do what I want, but they all seem to rely on a static filetype, path, ...
-1
votes
3answers
382 views

How to rename all .jpg files in all subdirs wich contains dash in linux? [closed]

I have subfolders with dashes (example subdir with name c-d). I need to rename all .jpg files in all subdirs. Any tips how to do it? I've tried many options, but nothing helped (I think because my ...
0
votes
2answers
47 views

Delete first words from all folder names in directory

Anyone knows how to write a bash script that can rename all folders in a directory? It needs to delete the first words of all folders. Currently it looks like this: ABC DEF Folder1 ABC DEF Folder2 ...
0
votes
1answer
40 views

How can l rename a set of directories given the list of new names?

l would like to rename my directories following a list of new names. l am wondering hoc can l take advantage of using the following command to rename a set of directories which are in the same ...
0
votes
4answers
389 views

Add to a prefix filename the name of its directory

l have about 100 directories such as : walking, writing, dancing, swimming. Each of these directories contains a set of files. l would like to add the prefix name of the directory to the ...
0
votes
0answers
37 views

Rename file with regular expression [duplicate]

How can I rename the files based on the regular expression of the link? https://regexr.com/3jiu4 example 10240-RI_14-12-2019.pdf to 10240-RI.pdf
0
votes
1answer
56 views

Devices with same model names appearing once in Disks utility

Two of my external hard disks (/dev/sdb and /dev/sdc) that have the same model and properties are appearing as one in Ubuntu 16.04's Disks utility.They seemed to have been assigned the same ID ...
0
votes
1answer
307 views

Rename file using regex (Linux Command line)

I have a backup script which is creating two files: a) db_mywebsite_2018-01-10_00-25.sql.gz b) mywebsite1_2018-01-10_00-01.tar.gz I'm looking for a Linux command with regex to rename both files to ...
7
votes
2answers
758 views

Using rename, keeping part of the search regex

Morning, The current project I have to work on had a previous naming scheme that bothers me... Base.v2.c Base.v2a.c Slider.v4a.h Area.v2a.2.h I have been told the "a" in the version was to identify ...
1
vote
1answer
44 views

Batch renaming specific text within folder name

Is there a way to change capitalisation of text for folders, but leave text within brackets unchanged? Is there a possible way to do this pyRenamer? For example, if folders are named: dogs bark - ...
5
votes
1answer
944 views

rename command with perl expression

I can use the following command successfully, and I'm quite confident with this command to make other combinations: `rename 's/\.htm/\.html/' *.htm` However I want to know more about it, especially ...
6
votes
4answers
1k views

Renaming multiple files with complex numbered names

I have 365 files named MOD11A1.A2010001.h24v06.006.2016025150444.hdf MOD11A1.A2010002.h24v06.006.2016025151748.hdf MOD11A1.A2010003.h24v06.006.2016025163706.hdf and I want to rename these files as: ...
3
votes
3answers
4k views

How to remove characters from file names using command line?

I have a bunch of files needing renaming but I do not want to create a script for it, just a command line. I need to remove the last digits between the . and the .gif: 22771786_01.204.gif ...
10
votes
2answers
747 views

rename stopped working after upgrading from Ubuntu 17.04 to Ubuntu 17.10

rename worked fine before the upgrade, now running rename in a terminal shows the following: The program 'rename' can be found in the following packages: * perl * rename Any (simple) suggestions ...
7
votes
4answers
842 views

Rename files to be capitalised but not impact on file extensions

I am using this on a customer's directory to rename files with first letter of each word being capitalised as per their request: rename 's/\b(\w)/\u$1/g' * That works fine, but it also capitalises ...
0
votes
3answers
139 views

how to explicitly use mv to rename a folder(Pen-drive)?

I am trying to rename the my pen-drive by using mv command but it tries to move it and fails. uman@uman-All-Series /media/uman$ sudo mv USB\ STICK/ Videos mv: cannot move 'USB STICK/' to 'Videos': ...
3
votes
2answers
289 views

Image viewer for renaming while watching the image

I have a set of images with the date printed on them and I was wondering if anyone knows about an image viewer with the possibility of renaming while looking at the image, to make it faster and not ...
3
votes
2answers
1k views

Using wildcards to do mass renaming? [duplicate]

I realized I had named a bunch of files in an off-by-one fashion so I wanted to rename any file starting with "1" to the same thing except starting with 2. For example mv 1.4.5.txt 2.4.5.txt or mv 1-...
0
votes
1answer
104 views

Can't rename each 'file' to 'file.text' (using xargs)

I have received a task to do these commands on a text file: Choose each second field from the file Sort and choose first 3 unique values Print the contents of each value.text while redirecting ...
12
votes
1answer
327 views

What's the difference between the different “rename” commands?

Since Ubuntu 14.04 there are at least three rename commands: rename provided by the util-linux package, see man rename.ul rename provided by the perl package, see man prename rename provided by the ...
3
votes
1answer
156 views

Rename and convert dates in filename without file extension

My set of files are named according to GMT time zone. I successfully renamed and converted all files into the required time zone using the following steps. 1. This code removes all file extensions ...
7
votes
5answers
1k views

Renaming images in specific order

This is my problem: I have a folder with 500 images named: 1.jpg 2.jpg 3.jpg and so on.. I copied that folder and now I need to rename those same pictures from 501 to 1000 but in order like this: ...
8
votes
3answers
1k views

How to rename a group of files with what looks like a Windows file path in their names

I got a bunch of files with the filename messed up. All the file names have the same beginning which appear to be windows file directories. The problem is there are 700+ files and I really don't want ...
0
votes
1answer
350 views

Directory and Subdirectory Rename command special characters in filenames

I would like to remove []-_" etc. from multiple file names that are situated in different subdirectories. Found this rename "s/\[|\]/_/g" * but it's working only in a specific subdirectory and ...