I’m trying to rename a bunch of files in r with library(“tidyverse”).
As is: Snap-551-Image Export-01_c1_ORG.tif
The bold section is a running number, starting at 01 going to 150, each number combined with _c1 and _c2
TO be: 001_551_c1_AE2315_01.tif
The first 20 files are from the same sample. Therefore, the naming for those should have the same sample number, here 001 in bold. The original number should be used at the end of the new file name.
I would very much appreciate any help on this 🙂 Thanks a lot & best, Andi