1

In Applescript it's pretty easy to get the selected files in a Finder window.

tell application "Finder"
  set finderSelList to selection as alias list
end tell

Is there an equivalent in Powershell?

What I want to be able to do is get an arbitrary selection of files in an explorer window as an array of file objects. So

get-explorer-selection|%{do-something-to $_}

where get-explorer-selection returns an array of the selected files in the frontmost explorer window

4

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.