Reputation: 1221
I am trying to find a way to list all file names in a folder that matches this pattern :
20131106XXXXX.pdf
The prefix is the date, and the content and length of XXXX
vary across files, and I only care about pdf files.
Anyone could advise a way to do this?
Upvotes: 2
Views: 8308
Reputation: 1437
Try this
list.files(path="./yourdir",pattern="[[:digit:]]{8}.*\\.pdf")
Upvotes: 10