バッチファイルや関連付けでフォルダの詳細表示相当+フォルダサイズを保存印刷する。
ieに表示すれば、右クリックで「印刷」、「ソースの表示」で保存できます。
fsoだとフォルダサイズに全ファイルサイズが表示されます。
バッチファイルにフォルダをドロップします。あるいはバッチファイルをSendToフォルダに入れておいて、フォルダを送ります。
ps-fso-ie.cmd フォルダパス
powershell.exe "$ie=new-object -com internetexplorer.application;$ie.visible=$true;$ie.toolbar=$false;$ie.navigate('about:blank');$f=(new-object -com scripting.filesystemobject).getfolder('%~1');$html=($f.subfolders+$f.files|convertto-html -title '%~1' -property Name,Size,DateLastModified,Type|out-string);try{$ie.document.write($html)}catch{$ie.document.IHTMLDocument2_write($html)}"
ファイルフォルダのコンテキストメニューに関連付け
[HKEY_CLASSES_ROOT\Directory\shell\ps-fso-ie\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe \"$ie=new-object -com internetexplorer.application;$ie.visible=$true;$ie.toolbar=$false;$ie.navigate('about:blank');$f=(new-object -com scripting.filesystemobject).getfolder('%1');$html=($f.subfolders+$f.files|convertto-html -title '%1' -property Name,Size,DateLastModified,Type|out-string);try{$ie.document.write($html)}catch{$ie.document.IHTMLDocument2_write($html)}\""
ファイルフォルダのバックグラウンドメニューに関連付け
[HKEY_CLASSES_ROOT\Directory\Background\shell\ps-fso-ie\command]
@="C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe \"$ie=new-object -com internetexplorer.application;$ie.visible=$true;$ie.toolbar=$false;$ie.navigate('about:blank');$f=(new-object -com scripting.filesystemobject).getfolder('%v');$html=($f.subfolders+$f.files|convertto-html -title '%v' -property Name,Size,DateLastModified,Type|out-string);try{$ie.document.write($html)}catch{$ie.document.IHTMLDocument2_write($html)}\""
※ IEウィンドウがアクティブになれず、バックグラウンドで点滅します。
« バッチファイルや関連付けでフォルダの詳細表示相当+フォルダサイズを表示する。 | トップページ | バッチファイルや関連付けでフォルダの詳細表示を保存印刷する。 »