Hello spiceheads,
I need to create a file that contains each file extension we have on our fileservers.
I wrote a simple .ps one liner to find them and Out-file them int extensions.txt and it works good..well kind of.
This is my script till now:
Powershell
get-childitem-Recurse|%{$_.Extension.tolower()}|unique|Out-file.\extensions.txt
It works good but has a big disadvantage.
We have lots of folders or files that are named like this:
File#name.that.never.ends.withmany.dots.rar
this is horrible for my output as the script is going through the filenames from beginning to end and handles everything after the first dot as the beginning of the file extension.
I need a way to analyse files the other way around to avoid collect tons of trash.
Is there a command to do this?