-3

Using R, I want to find the number of system drives available on computer & external flash drives attached to it.

petermeissner
  • 12,234
  • 5
  • 63
  • 63
Sagar Nikam
  • 1,708
  • 3
  • 22
  • 35
  • 3
    Learn to use capital letters. Does "no" mean "number"? Operating system? Have some respect for the audience, please. There is a frequently cited posting here: http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – IRTFM May 07 '12 at 05:21

1 Answers1

11

This is really not an R question, but one for the operating system. You can use system to spawn jobs to the system and get back information.

Assuming you are using Windows, I found this on SuperUser.com.

sysdrivereport <- system("wmic logicaldisk get caption", intern = TRUE)
substr(sysdrivereport[-c(1, length(sysdrivereport))], 1, 1)

[1] "C" "D" "E" "F"
Community
  • 1
  • 1
mdsumner
  • 29,099
  • 6
  • 83
  • 91