Replace filename while changing its order

Advanced Renamer forum
#1 : 19/11-24 03:29
Tavo
Posts: 5
Hello again!

Can someone pinpoint me how to replace a filename for another, while at the same time it's been reordered from after the version number to before the version number?

Let's exemplify...
Something like THIS:

1.59_Downloaded_Filename

FOR:

NewFileName v1.59


NOTE: It always has to apply to the condition of the downloaded name of the original filename
Thanks!

edited: 19/11-24 03:33
#2 : 19/11-24 03:59
Delta Foxtrot
Posts: 357
Reply to #1:

Hi Tavo, welcome back,

I'd start with a Replace method to move the version, something like this:
(no quotes in any of this)
Replace: "^(\d+)\.(\d+)(.*)$"
With: "$3 v$1.$2"
Occurrence: All
Case sens: unchecked
Reg. Exp.: CHECKED

Not sure what other transformations you need. Actual examples would be great.

Best,
DF

edited: 19/11-24 04:05
#3 : 19/11-24 04:49
Tavo
Posts: 5
Reply to #2:
Thanks for you reply DF

The order of the originally downloaded filename was changed successfully to before the version number in the filename arrangement, it worked great!... BUT... how do I change (replace) the downloaded filename for a specific name I want to always assign to the file? At the same time, (in the same method)

Let's say....

Replace (or change) this:
1.59_firefox_downloaded

to:
Firefox Install v1.59

*obviously, version number will always be changing with a new download, but not the original downloaded filename nor the name I want to assign to the file*

edited: 19/11-24 04:57
#4 : 19/11-24 06:35
Delta Foxtrot
Posts: 357
Reply to #3:

There are several different ways to do that, and which is most efficient depends on a couple of things:
1. Do you have a few different file types that you download normally, or is it many? I'd count many as more than maybe twenty or thirty. If so we'll need to have a conversation about either "List replace" method or importing a .csv file with conversion information.
2. Do all original filenames start with version, then have a word you can carry over and use in the new filename? If so you may be able to do something like this:

Replace method:
Replace: ^(\d+)\.(\d+)(.*)(firefox|excel|pgsql|libreoffice|advancedrenamer)(.*)$
With: $4 Install $1.$2
Reg. Expr. CHECKED

Then you would just have to add a New case method to uppercase the first letters.

Screenshot: https://drive.google.com/file/d/1a_nITUKQYuHLD_i NA_mxQMw07DuCft3e/view?usp=sharing

If that works great, if not shoot us some more examples and more information about the size of the job and we'll try to help more.

Best,
DF

edited: 19/11-24 06:39
#5 : 19/11-24 08:53
Tavo
Posts: 5
Reply to #4:

*SOLVED* it totally worked for renaming and relocating any filename.

Thanks as always DF!

Best,
Tavo