Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-02-27 18:53:34

tcreiyon
Member
Registered: 2025-02-27
Posts: 2
LinuxChrome 133.0

Perform integer padding with Thunar Bulk Rename Gui?

The following image details what I'm trying to do.
It is to transform File_01_01 to File_01_001; with 3 digits at the end of the filename.

I was able to create 2 distinct capture groups with the following:

(.*)(?<!\d)(\d+)

And retrieve them with $1 $2
CKKmsOv.png

Offline

#2 2025-02-27 19:39:34

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,815
LinuxFirefox 134.0

Re: Perform integer padding with Thunar Bulk Rename Gui?

Hello and welcome.

If you're just looking to add a padded zero in that location:

$1 0$2

Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2025-02-27 20:57:17

tcreiyon
Member
Registered: 2025-02-27
Posts: 2
LinuxChrome 133.0

Re: Perform integer padding with Thunar Bulk Rename Gui?

ToZ wrote:

Hello and welcome.

If you're just looking to add a padded zero in that location:

$1 0$2

I wish to do something similar to the following: 
rename –n 's/(.*)(?<!\d)(\d+)/sprintf("%s%03s", $1, $2)/e' *

This can accomodate _1, _01, _001, pad 3 if need be. I do apologize for not making my post more clear.

Just adding a 0 will require me to copy and paste in multiple files at separtate time.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 525.14 KiB (Peak: 531.49 KiB) ]