mercredi 2 mars 2016

BASH - Rename files excluding a constant pattern

I'm trying to write a bash script that rename files only with specific extension (.dat) as its folder but excluding a constant patter.

Something like this:

ABC - FolderName/examplefile.dat => ABC - FolderName/FolderName.dat

DEF - OtherFolderName/otherexamplefile.dat => DEF - OtherFolderName/OtherFolderName.dat

ABC - and DEF - are constant pattern.

Aucun commentaire:

Enregistrer un commentaire