?list.files and ?regexp Warning: following obviously untested:
Gfiles <- list.files("G:", pattern = ".*10806\\.xls$") should then give you a vector of character names of the files you want to feed to read.xls() or whatever function exists in the favored package is for reading Excel files these days. Cheers, Bert On Thu, Dec 26, 2019 at 9:54 AM Thomas Subia <tsu...@imgprecision.com> wrote: > Colleagues, > > I have two locations where my data resides. > One folder is for data taken under treatment A > One folder is for data taken under treatment B > > "G:\ 0020-49785 10806.xls" > "Q:\ 301864 4519 10806.xls" > > Here the 10806 is the part which is common to both directories. > > Is there a way to have R extract parts common to both directories? > > Thomas Subia > Statistician / Senior Quality Engineer > ASQ CQE > > IMG Companies > 225 Mountain Vista Parkway > Livermore, CA 94551 > T. (925) 273-1106 > F. (925) 273-1111 > E. tsu...@imgprecision.com > > > Precision Manufacturing for Emerging Technologies > imgprecision.com > > The contents of this message, together with any attachments, are intended > only for the use of the individual or entity to which they are addressed > and may contain information that is legally privileged, confidential and > exempt from disclosure. If you are not the intended recipient, you are > hereby notified that any dissemination, distribution, or copying of this > message, or any attachment, is strictly prohibited. If you have received > this message in error, please notify the original sender or IMG Companies, > LLC at Tel: 925-273-1100 immediately by telephone or by return E-mail and > delete this message, along with any attachments, from your computer. Thank > you. > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.