Find files by extension and replacing characters before and after the search pattern
1
vote
1
answer
74
views
I need to find a files by extensions and replace the random characters before the search pattern to the specified text (REPLACED), turn the numbers after this pattern into an increasing counter and move 'em to another folder. Examples below:
find files by extension .EXT
/opt/files/QvmBIsB3_PATTERN_77580.EXT
/opt/files/8iV8QhFwQos_PATTERN_77580.EXT
/opt/files/lgI6JUEh55za488_PATTERN_77580.EXT
change 'em and replace to another folder:
/opt/replaced/REPLACED_PATTERN_1.EXT
/opt/replaced/REPLACED_PATTERN_2.EXT
/opt/replaced/REPLACED_PATTERN_3.EXT
Asked by anc
(11 rep)
Apr 16, 2024, 12:23 PM
Last activity: Apr 16, 2024, 09:45 PM
Last activity: Apr 16, 2024, 09:45 PM