Using R, I want to find the number of system drives available on computer & external flash drives attached to it.
Asked
Active
Viewed 136 times
-3
-
3Learn 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 Answers
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"