% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ghfile.R
\name{ghfile}
\alias{ghfile}
\title{ghfile}
\usage{
ghfile(x, n = 6, silent = FALSE, msg = "\%s")
}
\arguments{
\item{x}{character: a single file name}

\item{n}{logical: if \code{x} can not be found how many best matches should be returned (default: \code{6})}

\item{silent}{logical: if no (unique) match is found, then \code{NULL} is returned, otherwise an error is thrown (default: \code{FALSE}, throw error)}

\item{msg}{character: error message how to put the file name(s (default: \verb{\%s})}
}
\value{
the full matching file
}
\description{
Finds either a unique match in the list of files or throws an error with possible candidate files.
}
\examples{
ghfile("data/BANK2.sav")
if (interactive()) ghfile("data/BANK2.SAV")  # throws an error
}
