Search results can be exported by clicking on the export link above the search results. Does splunk provide a command/function that can be used in the search bar that pipes search results to a file and the file name can be specified?
no, this is the default location.
Another option is to use the command line search and pipe the result to a file in any folder you are.
/opt/splunk/bin/splunk search "mysearch" -output /myfolder/myfile.csv