how can I list all the unique file extensions in a directory tree? i've googled and found some command prompt codes, but none work (keeps saying 'sed' is not recognized... and this is in every batch of code I've found).
find . -type f | sed -e 's/.*\.//' | sort | uniq -c | sort -rn
9/3/2010 2:29:09 PM
Whatever you do, don't tell us what operating system you're using.Let's let that be a surprise.
9/3/2010 2:33:18 PM
http://cygwin.org/
9/3/2010 6:00:20 PM
better idea: http://gnuwin32.sourceforge.net/packages.htmlor for a more automated experience: http://sourceforge.net/projects/getgnuwin32/files/Install "sed," "coreutils," "findutils," and "fileutils" along with anything else you want into C:\gnuwin32\Then press WinKey+Break to open System Properties, go to the Advanced tab, and click "Environment Variables"Then under System Variables, find PATH and edit it by typing this right at the beginning:
C:\gnuwin32\bin;
9/3/2010 8:22:36 PM
you prefer cmd.exe to bash or zsh? To each their own I suppose...
9/4/2010 6:30:46 PM
when in rome windows...I actually love this in combination with the "Open Command Window Here" command in the right-click menu for folders; the way to get this is different for every version of Windows
9/4/2010 6:43:11 PM
^^^Thanks, I'll look at that/try to figure it out^^doesn't matter to me. I don't know shit about doing this and I just need it done one time to figure out if there are some different files types within a directory tree of about 50,000 files and hundreds of folders (it's my music and for some reason, not all my songs are loading into my media player, tag editor, and music uploading service, thus I'm hoping there are just a few hundred files that aren't mp3s).[Edited on September 5, 2010 at 2:09 PM. Reason : .]
9/5/2010 2:08:30 PM
http://www.computerperformance.co.uk/powershell/powershell_recurse.htmYou'll have to download Powershell if you're running XP or Vista, but otherwise this page will teach you everything you need to know.
9/5/2010 6:30:24 PM
yeah, PowerShell is also good, but the Unix way is better-supported on the Internets
9/5/2010 11:39:08 PM
Yeah, and it only requires a ton of unnecessary software being installed along with editing environment path variables! A better solution indeed!
9/6/2010 4:17:52 PM
^ 17.999k
9/6/2010 4:18:33 PM