For example a MP3 file is an extended file you can use to see some advanced properties.
This methos is useful for a lot of file types, not only MP3. Note, you will have to review the result differently when you work on a specific version of your operating system.
I need in this example to retrieve some informations to store correctly my files.
Below script show only how to remove some informations without exporting it to a file.
Script :
# Listing of the file concerned
$mp3list = gci "path where the file is located" -recurse | % {$_.fullname}
$mp3list | % {
$path = $_
$shell = New-Object -COMObject Shell.Application
$folder = Split-Path $path
$file = Split-Path $path -Leaf
$shellfolder = $shell.Namespace($folder)
$shellfile = $shellfolder.ParseName($file)
0..287 | Where-Object { $shellfolder.GetDetailsOf($shellfile, $_) } |
Foreach-Object {
'{0} = {1} = {2}' -f $_,
$shellfolder.GetDetailsOf($null, $_),
$shellfolder.GetDetailsOf($shellfile, $_)
}
}
your script will show these informations :
1 = Size = x Ko
2 = Element Type = votre lecteur associé au type de fichier (.mp3)
3 = Modified date = JJ/MM/YYYY HH:MM
4 = Creation date = JJ/MM/YYYY HH:MM
5 = Last access date = JJ/MM/YYYY HH:MM
6 = Attributes = A
9 = Type = Audio
10 = Owner = Workstation\Owner
11 = Kind = Documents
19 = Rating = Non classé
20 = Author = Chanteurs ou groupes
21 = Title = titre de la chanson
27 = Length = HH:MM:SS
28 = Transmission speed = xxxx Kbits/s
29 = Protected status = No/Yes
53 = Computer = Hostaname of your computer
155 = File name = nom-du-fichier.mp3
173 = Shared status = No/Yes
176 = FolderName = Name of your parent folder
177 = Folder path = all information from your path to reach your file , it's corresponding to number "176"
178 = Folder = Parent folder where the file is stored
180 = Path = full path reference to reach the file (ex : c:\myfolder1\myanotherfolder\myfile.mp3
182 = Volume = volume reference where your file is stored (.mp3)
188 = Link status = Not resolved
269 = Shared status = not shared
You can see a lot of informations depend of your tags or advanced properties in your file.