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
0
votes
2answers
30 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
16 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 ...
0
votes
0answers
18 views

Can't batch rename files after batch renaming it

I noticed something weird happened when I tried to batch rename again my audio files to the same format of [01,02,03]. I will try to tell what happened chronologically to make things clear I batch ...
-1
votes
1answer
30 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
30 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
78 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
61 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
60 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
238 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
23 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
136 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
0answers
79 views

Rename files based on m3u file

I have some m3u files: line 1: move name line 2: movie path The file name is randome numbers, I need to rename it to the actual name as in the line before it. Ex: #EXTINF:-1 tvg-ID="" tvg-name="...
0
votes
1answer
63 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
75 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
305 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
35 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
485 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....
0
votes
2answers
134 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
vote
0answers
48 views

Cannot rename files or folders in Nautilus (long time running occuring issue)

When I run Ubuntu 16.04 for a long time (let us say minimum overnight, sitting idle) on my ASUS ROG G752VSK laptop, Nautilus repeatedly run into this funny issue, which is described perfectly here: ...
1
vote
0answers
38 views

“find: rename: no such file or directory” when running `-exec rename` in find [duplicate]

I am trying to rename files in src folder bitcoin/src by using: find . -exec rename 's/bitcoin/altcoin/' {} ";" also tried: find ./ -type f -readable -writable -exec rename -e 's/bitcoin/altcoin/g' ...
2
votes
2answers
524 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 ...
1
vote
3answers
95 views

Rename folders from file name [script]

I want rename every folder with the name of the single file inside. Example: Folder1/AAA.jpg Folder2/BBB.jpg FOlder3/CCC.jpg Folder4/05.02.2019.jpg to AAA/AAA.jpg BBB/BBB.jpg CCC/CCC.jpg 05.02.2019/...
1
vote
3answers
408 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) ...
1
vote
1answer
101 views

Rename multiple folders, using regex

As the title says, I'm looking for a command / tool - preferably something running from the terminal (I'm using Ubuntu on a remote server), that can replace a specific part of multiple directories at ...
-1
votes
1answer
42 views

How to rename multiple files with a command or script

I have hundreds of image files (.jpg) with different names with nothing in common; e.g., 12223.jpg, beautiful-ocean.jpg, aWkqi.jpg. How can i rename them all in series, such as 1.jpg, 2.jpg, 3.jpg...
0
votes
0answers
141 views

How to rename file from ls?

basically, my download directory is always full. Every time I download new file, I use command like ls -t | head -n1 to show the file I just Downloaded. Some time, I would like to just rename ...
1
vote
1answer
39 views

Trouble getting rename working with regex groups

Folder of files that need to be changed to YYYY-MM-DD.pdf but currently are MMDDYYYY.pdf This is what I came up with but it's not working rename -nv 's/^(\d{2})(\d{2})(\d{4}).*/$3-$1-$2.pdf/' *.pdf
-1
votes
1answer
150 views

How to I change the extension of a .txt file?

I have a .txt file but i need a .bat or .sh file, but i am new and do not know what to do. I have tried a couple of things, but none have worked so far. Any help?
1
vote
1answer
531 views

Rename all files in directory through terminal [duplicate]

Say, I have several files in a directory. How do I rename all of them to "001", "002", etc., saving their current file extensions?
0
votes
3answers
483 views

change many file names to hash (sha256)?

I have a bunch of video files where all the file names are un-useful gibberish. 1) Is there an easy command to change the names of all the files in a folder to a hash, like (sha256).mp4? I don't want ...
0
votes
1answer
36 views

Bulk file rename, maintaining timestamps, excluding some

In Ubuntu 18.10 have beeen using mmv to prepend folder names (a date) to file names within multiple folders ('-n' flag here to review results): mmv -n './????-??-??*/*.*' './#1#2#3#4-#5#6-#7#8#9/#1#2#...
3
votes
1answer
147 views

How Can Krusader Prepend the File Modification Date in ISO 8601 Format to the Original File Name?

I want to prepend the file modification date in the form YYYY-MM-DD_ to each existing filename (i.e. for files only, not for directories). I have seen that krusader has a multiple file renaming ...
2
votes
1answer
94 views

Can the “rename” command distinguish between directories and files? [duplicate]

I need to rename only directories and not files, and I want to do it with rename. Is there any way to do it? It says nothing in the manual about differentiating between directories and files. This ...
1
vote
2answers
917 views

Rename multiple files sequentially and starting by the same prefix

I have a folder containing like 1500 files, I want to rename them automatically via the terminal or a shell script as follows: "prefix_number.extension". Example: cin_1.jpg, cin_2.png ...
0
votes
0answers
18 views

change names of files into different folders

I actually have several folders with one file into each of them for exemple : name_folder1 name_folder1_GCA_567.9_genomic.fna name_folder2 name_folder2_GCA_9002.0_genomic.fna ...
0
votes
1answer
87 views

Rename multiple files of different name and extensions with parent directory name

I'm trying to figure out how to rename multiple files (100s) that have different extensions to their respective sub directory name. Here is the structure: Parentdir |--subdir1 |---name1.txt ...
1
vote
1answer
193 views

How can I rename a PDF file while viewing it?

I have many PDF files that I need to rename based on their visual content. Is there a PDF file viewer that will allow me to rename the file from within the viewer without having to go back to the file ...
1
vote
0answers
246 views

This command to rename all files fails: “find: 'rename': No such file or directory” [duplicate]

Trying to replace all file names in a directory with ai to newai. Execute: find . -exec rename 's/ai/newai/' {} ";" Error: find: ‘rename’: No such file or directory What could be the problem here, ...
3
votes
2answers
7k views

Rename command not found when running a script

I'm trying to to execute a script, which uses the command rename. When I execute it, I get a message rename: command not found. Any ideas? if [[ -z '$3' ]]; then shopt -s dotglob rename "$...
1
vote
1answer
695 views

How to rename multiple files depending on its parent directories name in linux? [duplicate]

I have a main directory bp and it has many sub-directories bp01, bp02, bp04. In each directory it has a file and the name of each file is randomly but start with co. I want to change each file name ...
0
votes
1answer
696 views

how to change the displayed name of Wired ethernet in nm-applet [closed]

I just want to change the name shown in this picture (the name in the applet shown by red color) : click to see image NOT the name (vmnet1) that is shown in the ifconfig or IP link: vmnet1: flags=...
3
votes
1answer
111 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
405 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
23 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
36 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
3answers
223 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 ...
2
votes
1answer
433 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 ...
3
votes
1answer
155 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
504 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
1k 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

1
2 3 4 5 6