1% File src/library/utils/man/choose.dir.Rd 2% Part of the R package, https://www.R-project.org 3% Copyright 2007-2018 R Core Team 4% Distributed under GPL 2 or later 5 6\name{choose.dir} 7\alias{choose.dir} 8\title{Choose a Folder Interactively on MS Windows} 9\description{ 10 Use a Windows shell folder widget to choose a folder interactively. 11} 12\usage{ 13choose.dir(default = "", caption = "Select folder") 14} 15\arguments{ 16 \item{default}{which folder to show initially.} 17 \item{caption}{the caption on the selection dialog.} 18} 19\value{ 20 A length-one character vector, character \code{NA} if 21 \sQuote{Cancel} was selected. 22} 23\details{ 24 This brings up the Windows shell folder selection widget. With the 25 default \code{default = ""}, \sQuote{My Computer} (or similar) is 26 initially selected. 27 28 To workaround a bug, on Vista and later only folders under 29 \sQuote{Computer} are accessible via the widget. 30} 31\note{ 32 This is only available on Windows. 33} 34\seealso{ 35 \code{\link{choose.files}} (on Windows) and \code{\link{file.choose}} 36 (on all platforms). 37} 38\examples{ 39 if (interactive() && .Platform$OS.type == "windows") 40 choose.dir(getwd(), "Choose a suitable folder") 41} 42\keyword{file} 43