Re: [R] Possible to access a USB volume by name in windows

2011-09-07 Thread Joshua Wiley
Well that is really on the windows end, not the R end (which may not make it any less surprising). I would not be surprised if there was an easier way using .net or vbs which I get the sense is partly where some things are going (e.g., with the so-called PowerShell), but I am not terribly

Re: [R] Possible to access a USB volume by name in windows

2011-09-07 Thread Gene Leynes
Thank you. This is a nice trick, and it works fine for my needs. It's surprising that there isn't a simple way to get to the drive name. On Tue, Sep 6, 2011 at 10:41 PM, Joshua Wiley jwiley.ps...@gmail.comwrote: Hi, This comes with absolutely no guarantees (and a good recommendation to be

[R] Possible to access a USB volume by name in windows

2011-09-06 Thread Gene Leynes
On the Mac it's pretty easy to get to a USB drive by name. For example the following command works if you have a USB drive named MYUSB setwd('/Volumes/MYUSB') Is there a way to do the same thing in Windows (without knowing the drive letter)? Thanks! [[alternative HTML version

Re: [R] Possible to access a USB volume by name in windows

2011-09-06 Thread Jeff Newmiller
AFAIK the answer is no. There are ways to look up the volume label given the drive letter, with which you can search for the drive letter by trial and error, but in most cases that is more trouble than it is worth. --- Jeff

Re: [R] Possible to access a USB volume by name in windows

2011-09-06 Thread Joshua Wiley
Hi, This comes with absolutely no guarantees (and a good recommendation to be cautious), but you could try it: myset - function(name = , path = ) { res - vector(character, length(LETTERS)) for(i in LETTERS) { res[i] - shell(shQuote(paste(VOL , i, :, sep = '')), intern = TRUE,