Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Find only one different extension, whole path, last write time, only files and over 260

$
0
0

Hello!

I need some help with my PowerShell script. This is what I got so far.

Get-ChildItem p:\ -Include *.* -Recurse | Where { ! $_.PSIsContainer } | Select-Object Extension,LastWriteTime | Sort-Object -Property Extension -Unique | Out-File c:\skriptit\file.txt

I need to find out every different extension what there is our shared files. I want only one file for each extension and it have to be last time when somebody used(write) it. I also need whole path and over 260 character
long. Also every subfolders and only files, no folders.

This script what I have, it take first extension it finds and take that Last Write Time. Also threre is no full path and no over 260 characters.

Mika


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>