-4

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

petermeissner
  • 11,537
  • 5
  • 57
  • 60
Sagar Nikam
  • 1,608
  • 3
  • 23
  • 34
  • 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

12

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
  • 28,238
  • 5
  • 80
  • 88