All Questions
28
questions
0
votes
2
answers
59
views
rename - move [ ] delimited part of filename to end of filename
I've been playing with the perl implementation of the rename tool in cygwin having finally got it working via installing from cpan.
It's been a long time since i played with this stuff so I'm a bit ...
4
votes
3
answers
1k
views
Renaming files in Linux using perl scripting
I have a set of files with prefix, say "pre_", on a Linux machine and I just want to rename all of these files by removing that. Here is the perl code I wrote it doesn't throw any errors, ...
0
votes
1
answer
77
views
How to find the text between the nth occurence of a character and occurence n+1 with perl-rename?
perl-rename 1.14-1
Arch Linux: linux 6.2.12.arch1-1
I have a directory/folder with several subdirectories, all are named by one of the following patterns
Status quo of existing patterns
something-...
0
votes
1
answer
201
views
Change file name based on contents
I'm trying to rename a set of files based on what is in the file itself. I have likely more than a thousand files to rename by the time I'm done. I have code that will get me the first part of the ...
9
votes
1
answer
3k
views
What are the different versions of the rename command? How do I use the Perl version?
This is a mess. How do I know which command to use when we expect Perl's rename with s/// sed-like syntax, when there're tons of different implementations of rename, that are different versions of the ...
4
votes
1
answer
415
views
Using perl's rename to renumber a list of files, starting at a certain value
I'm trying to renumber a list of files, which at a given point in their filename have one index consisting of a four-digit number. These files are consistently output starting from 0001, but need to ...
1
vote
1
answer
151
views
How can I condense several regex to a one-liner?
I'm having trouble condensing several regex down to an efficient one-liner. I have file names which are named like this: Something (0482) - a123b456 - Something [00xcf bxc v32 Something]. I'd like the ...
1
vote
2
answers
231
views
How replace all dots AFTER other chars got captured
I'm trying to rename some shows with the perl-rename command.
The format currently looks something like this:
series.S01E**.title.of.the.episode.mkv
The asterisks are place holders for the episode ...
3
votes
1
answer
117
views
Best way to remove and replace different characters from multiple filenames?
I have several folders full of files with the following format:
Show Name - 07x09 - Episode Title.mp4
What I'm trying to do is rename them to the following format:
Show.Name.S07E09.Episode.Title.mp4
...
1
vote
1
answer
79
views
(perl) Rename bulk files - moving section starting with #{NUMBER} to front
I am trying to rename many files with the example formatting using rename with perl scripting
'Balisong Tutorial - (0g Chaplin) - Advanced #21-d8ajkHL34s0.mkv'
'Balisong Tutorial - (ALT Reverse Behind ...
0
votes
1
answer
183
views
What does \L$2 mean in perl rename tool?
I see this command advised, whenever a person asks online about renaming all uppercase files to lowercase:
find "$(pwd)" -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;
I understand ...
1
vote
2
answers
4k
views
Perl-rename: regex for case-insensitive matching
perl-rename 's/b(\d{2}A)/\1/' * finds and renames every part of any file with
"b" followed by
2 digits followed by
"A"
Is there an option or way to make the regular expression case-insensitive, i.e. ...
0
votes
1
answer
1k
views
rename fastq.gz file name
I have hundreds fast.gz files, and they have the same format of file name:
5809029_GWU_DNA_269_L001_R1_001.fastq.gz
5809030_GWU_DNA_269_L001_R1_001.fastq.gz
How do I change the first and the second ...
3
votes
3
answers
3k
views
Rename to remove everything after a special character
I recently discovered the perl-based rename function but since I don't know anything about perl I can't use it properly. I found of a lot of question about the subject but nothing helped me.
I would ...
0
votes
2
answers
269
views
shell expanding rename command backreferences
When I'm using group matched pattern in rename command and use their back references in replacement part and I also want to have command substitution expansion as well within my rename command and ...