choose.dir

0th

Percentile

Choose a Folder Interactively on MS Windows

Use a Windows shell folder widget to choose a folder interactively.

Keywords
file
Usage
choose.dir(default = "", caption = "Select folder")
Arguments
default

which folder to show initially.

caption

the caption on the selection dialog.

Details

This brings up the Windows shell folder selection widget. With the default default = "", ‘My Computer’ (or similar) is initially selected.

To workaround a bug, on Vista and later only folders under ‘Computer’ are accessible via the widget.

Value

A length-one character vector, character NA if ‘Cancel’ was selected.

Note

This is only available on Windows.

See Also

choose.files (on Windows) and file.choose (on all platforms).

Aliases
  • choose.dir
Examples
library(utils) # NOT RUN { if (interactive() && .Platform$OS.type == "windows") choose.dir(getwd(), "Choose a suitable folder") # }
Documentation reproduced from package utils, version 3.6.1, License: Part of R 3.6.1

Community examples

Looks like there are no examples yet.