Suppose I have many PDF files in ./reports
, where all the file names start with my-report
then date. For example, my-report-20200901.pdf
.
- How do I replace
my-report
withdoc
e.g.my-report-20200901.pdf
will becomedoc-20200901.pdf
? - How do I keep dates only i.e. file name would be
20200901.pdf