Renaming with variables

Javascript renaming examples. Javascript renaming is supported in version 3 or newer.

Renaming with variables

Postby acco » Tue Mar 05, 2024 2:33 pm

Hi at all, anyone can help me ?

I need to rename some files around 3k.
They will must have the current codification: CODIC_YYYYMMDD_Surname_Name
CODIC is an example, the first 5 digit are variable for the type of document.
Actually the name of files is: yyyymmdd_SURNAME_NAME_description
So i need to find "description" tha can be like RISKALTO and replace it with RisAl (CODIC) at the start of the new name.
For example:
if description = RISKALTO replace it with RisAl
if description= BASSO replace it with RisBa
after put RisAl at the start.
list type of first 5 digit (CODIC)
Idsa1
RisAl
RisBa
Dirig
Prepo
AddAI
AddRA
AddPS
Pespa
Escav
GruTo
GruAu
CaTel
CaEle
Lavqu
AddSe
RLSag
S8000
Pd125
30415
Idsa2
NomPS
NoPre
Noaai
NoPES
Adple
Unila
Unind
Idsa5
00Is0
00Is1
25kri
25kvm
25krn
3kvri
3kvma
3kvrn
Mdorf
Mdoma
Mdori
Mepri
Mepcm
Meprn
Metri
Metrn
Metma
Mepfs
Mdofs
Csmo1
Codpi
Tefnb
Tefnb
Tefse
acco
 
Posts: 1
Joined: Tue Mar 05, 2024 2:15 pm

Return to Javascript Renaming


cron