Browse for File
UiPath.Core.Activities.SelectFile
Opens a dialog box at runtime to browse for a file and select it for use in the project.
Project compatibility
Windows | Windows - Legacy
Windows, Windows - Legacy configuration
- File types - Choose the file types to be shown in the dialog by selecting them from the dropdown menu. The available options are:
- All files (.)
- CSV
- Excel
- PDF Files
- PowerPoint
- Text
- Word
- Custom - If selected, you can create filters to specify the types of files that show up in the dialog box, such as
*.png,*.jpg,*.jpeg,*.json,*.xaml.
- Selected file path - Set the path where the selected file is saved.
Properties panel
Common
- DisplayName - The display name of the activity.
Input
- Filter - The filter used to find specific file types.
- Initial directory - The directory that opens by default when you browse for files. This can be a path or a system folder:
- Using strings, such as "C:\Work" for absolute paths
- Using expressions, such as
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData, whereEnvironment.SpecialFolderis an enum andLocalApplicationDatais one of the values. - Using relative paths, such as
Path.GetFullPath(“..\MyPreviousFolder“)
- Multiselect - If selected, allows multiple files selection.
Misc
- Private - If selected, the data used in the activity is not logged.
Output
- Selected file - The full path of the selected file.
- Selected files - A list of the full paths for the selected files, when the Multiselect option is set to
True.