Rev 44615 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/base/man/Sys.which.Rd% Part of the R package, http://www.R-project.org% Copyright 2007 R Core Development Team% Distributed under GPL 2 or later\name{Sys.which}\alias{Sys.which}\title{Find Full Paths of Executables}\description{This is an interface to the system command \code{which}.}\usage{Sys.which(names)}\arguments{\item{names}{Character vector of names of possible executables.}}\details{The system command \code{which} reports on the full names of anexecutable (including an executable script) found on the current path.#ifdef windowsAn \sQuote{executable} has extension \file{.exe}, \file{.com},\file{.cmd} or \file{.bat}. Such files need not actually beexecutable, but this is what \code{\link{system}} tries.#endif}\value{A character vector of the same length as \code{names}, named by\code{names}. The elements are either the full path to theexecutable/script or \code{""} if no executable of that name wasfound.#ifdef windowsThe paths will be short paths (8+3 components, no spaces) with\code{\\} as the path delimiter.#endif}\examples{## the first two are likely to exist everywhere## texi2dvi exists on most Unix-alikes and under MiKTeXSys.which(c("ftp", "ping", "texi2dvi", "this-does-not-exist"))}\keyword{ utilities }