I am kind of new to Powershell and just want to check if something is possible.
I understand there is a way to allow me to get the path of an individual file and even multiple files with the OpenFile dialog. I also understand there is a way for the user to select a folder with the folderbrowser dialog.
What I am looking for is a way for the user to select a path, whether that be a folder or a file(with multiselect).
I currently have a script which allows the user the select a folder path which is then used in my script:
Get-ChildItem -Path $folderBrowser.SelectedPath -Recurse -File |
ForEach-Object{
$_.creationtime=$($_.CreationTime.AddDays($daysTextBox.Text)) }
I want to update the existing script to allow for files or folders to be selected rather than duplicating the script.
I've searched extensively online but so far I haven't found anything.