Print extension types
Posted: 03 Mar 2017 18:32
The following script displays the extensions for all file categories in the dialogue box.
How do I get it to send the extension to a new text file?
I want to do this so I can build a list of file types to exclude from a search.
How do I get it to send the extension to a new text file?
Code: Select all
$fileTypes = "{:Archive}|{:Audio}|{:Executable}|{:Font}|{:Image}|{:Media}|{:Office}|{:Photo}|{:Text}|{:Vector}|{:Video}|{:Web}";
$maxStrLen = 15; // "{:Executable}"
$content = "";
foreach($entry, $fileTypes) {
$entries = recase(formatlist(regexreplace(get("genericfiletype", $entry, ","), "\*\."), "s", ","), "l");
$content = $content . $entry . strrepeat(" ", $maxStrLen - strlen(quote($entry))) . ": " . $entries . <crlf>;
}
text $content;