
Applescript では、選択したファイルを Finder ウィンドウで取得するのは非常に簡単です。
tell application "Finder"
set finderSelList to selection as alias list
end tell
Powershell に同等のものはありますか?
私がやりたいのは、エクスプローラーウィンドウ内の任意のファイルをファイルオブジェクトの配列として取得することです。
get-explorer-selection|%{do-something-to $_}
get-explorer-selection
最前面のエクスプローラーウィンドウで選択されたファイルの配列を返します。