#include <array.au3>
$path = FileOpenDialog("Select a file to read attributes", @ScriptDir, "All (*.*)")
$prop = _GetExtProperty($path, -1)
_ArrayDisplay($prop, "Property Array")


;===============================================================================
; Function Name:	GetExtProperty($sPath,$iProp)
; Description:      Returns an extended property of a given file.
; Parameter(s):     $sPath - The path to the file you are attempting to retrieve an extended property from.
;                   $iProp - The numerical value for the property you want returned. If $iProp is is set
;							  to -1 then all properties will be returned in a 1 dimensional array in their corresponding order.
;							The properties are as follows:
;							Name = 0
;							Size = 1
;							Type = 2
;							DateModified = 3
;							DateCreated = 4
;							DateAccessed = 5
;							Attributes = 6
;							Status = 7
;							Owner = 8
;							Author = 9
;							Title = 10
;							Subject = 11
;							Category = 12
;							Pages = 13
;							Comments = 14
;							Copyright = 15
;							Artist = 16
;							AlbumTitle = 17
;							Year = 18
;							TrackNumber = 19
;							Genre = 20
;							Duration = 21
;							BitRate = 22
;							Protected = 23
;							CameraModel = 24
;							DatePictureTaken = 25
;							Dimensions = 26
;							Width = 27
;							Height = 28
;							Company = 30
;							Description = 31
;							FileVersion = 32
;							ProductName = 33
;							ProductVersion = 34
; Requirement(s):   File specified in $spath must exist.
; Return Value(s):  On Success - The extended file property, or if $iProp = -1 then an array with all properties
;                   On Failure - 0, @Error - 1 (If file does not exist)
; Author(s):        Simucal (Simucal@gmail.com)
; Note(s):
;
;===============================================================================
Func _GetExtProperty($sPath, $iProp)
	Local $sFile, $sDir, $oShellApp, $oDir, $oFile
	If Not FileExists($sPath) Then Return SetError(1, 0, 0)
	$sFile = StringTrimLeft($sPath, StringInStr($sPath, "\", 0, -1))
	$sDir = StringTrimRight($sPath, (StringLen($sPath) - StringInStr($sPath, "\", 0, -1)))
	$oShellApp = ObjCreate("shell.application")
	$oDir = $oShellApp.NameSpace($sDir)
	$oFile = $oDir.Parsename($sFile)
	If $iProp = -1 Then
		Local $aProperty[267]
		For $i = 0 To 266
			$aProperty[$i] = $oDir.GetDetailsOf($oFile, $i)
		Next
		Return $aProperty
	Else
		Local $sProperty = $oDir.GetDetailsOf($oFile, $iProp)
		Return $sProperty
	EndIf
EndFunc   ;==>_GetExtProperty

;Attribute tables
;
;Windows XP
;Windows Server 2003 	Windows 2000
;-------------------------------------------
;0 Name			Name
;1 Size			Size
;2 Type			Type
;3 Date Modified	Date Modified
;4 Date Created		Attributes
;5 Date Accessed	Comment
;6 Attributes 		Date Created
;7 Status 		Date Accessed
;8 Owner 		Owner
;9 Author 		???
;10 Title 		Author
;11 Subject 		Title
;12 Category 		Subject
;13 Pages 		Category
;14 Comments 		Pages
;15 Copyright 		Copyright
;16 Artist 		Company Name
;17 Album Title		Module Desription
;18 Year 		Module Version
;19 Track Number 	Product Name
;20 Genre 		Product Version
;21 Duration 		Sender Name
;22 Bit Rate 		Recipient Name
;23 Protected 		Recipient Number
;24 Camera Model 	Csid
;25 Date Picture Taken	Tsid
;26 Dimensions 		Transmission Time
;27 ??? 		Caller Id
;28 ??? 		Routing
;29 Episode Name	Audio Format
;30 Program Description	Sample Rate
;31 Description		Audio Sample Size
;32 Audio sample size 	Channels
;33 Audio sample rate 	Play Length
;34 Channels	 	Frame Count
;35 Company		Frame Rate
;36 Description		Video Sample Size
;37 File Version	Video Compression
;38 Product Name	???
;39 Product Version	???
;40 Keywords (XP only)	???
;
;
;Windows Vista
;------------------------------------------------
;  0 Name
;  1 Size
;  2 Type
;  3 Date modified
;  4 Date created
;  5 Date accessed
;  6 Attributes
;  7 Offline status
;  8 Offline availability
;  9 Perceived type
; 10 Owner
; 11 Kinds
; 12 Date taken
; 13 Artists
; 14 Album
; 15 Year
; 16 Genre
; 17 Conductors
; 18 Tags
; 19 Rating
; 20 Authors
; 21 Title
; 22 Subject
; 23 Categories
; 24 Comments
; 25 Copyright
; 26 #
; 27 Length
; 28 Bit rate
; 29 Protected
; 30 Camera model
; 31 Dimensions
; 32 Camera maker
; 33 Company
; 34 File description
; 35 Program name
; 36 Duration
; 37 Is online
; 38 Is recurring
; 39 Location
; 40 Optional attendee addresses
; 41 Optional attendees
; 42 Organizer address
; 43 Organizer name
; 44 Reminder time
; 45 Required attendee addresses
; 46 Required attendees
; 47 Resources
; 48 Free/busy status
; 49 Total size
; 50 Account name
; 51 Computer
; 52 Anniversary
; 53 Assistant's name
; 54 Assistant's phone
; 55 Birthday
; 56 Business address
; 57 Business city
; 58 Business country/region
; 59 Business P.O. box
; 60 Business postal code
; 61 Business state or province
; 62 Business street
; 63 Business fax
; 64 Business home page
; 65 Business phone
; 66 Callback number
; 67 Car phone
; 68 Children
; 69 Company main phone
; 70 Department
; 71 E-mail Address
; 72 E-mail2
; 73 E-mail3
; 74 E-mail list
; 75 E-mail display name
; 76 File as
; 77 First name
; 78 Full name
; 79 Gender
; 80 Given name
; 81 Hobbies
; 82 Home address
; 83 Home city
; 84 Home country/region
; 85 Home P.O. box
; 86 Home postal code
; 87 Home state or province
; 88 Home street
; 89 Home fax
; 90 Home phone
; 91 IM addresses
; 92 Initials
; 93 Job title
; 94 Label
; 95 Last name
; 96 Mailing address
; 97 Middle name
; 98 Cell phone
; 99 Nickname
;100 Office location
;101 Other address
;102 Other city
;103 Other country/region
;104 Other P.O. box
;105 Other postal code
;106 Other state or province
;107 Other street
;108 Pager
;109 Personal title
;110 City
;111 Country/region
;112 P.O. box
;113 Postal code
;114 State or province
;115 Street
;116 Primary e-mail
;117 Primary phone
;118 Profession
;119 Spouse
;120 Suffix
;121 TTY/TTD phone
;122 Telex
;123 Webpage
;124 Status
;125 Content type
;126 Date acquired
;127 Date archived
;128 Date completed
;129 Date imported
;130 Client ID
;131 Contributors
;132 Content created
;133 Last printed
;134 Date last saved
;135 Division
;136 Document ID
;137 Pages
;138 Slides
;139 Total editing time
;140 Word count
;141 Due date
;142 End date
;143 File count
;144 Filename
;145 File version
;146 Flag color
;147 Flag status
;148 Space free
;149 Bit depth
;150 Horizontal resolution
;151 Width
;152 Vertical resolution
;153 Height
;154 Importance
;155 Is attachment
;156 Is deleted
;157 Has flag
;158 Is completed
;159 Incomplete
;160 Read status
;161 Shared
;162 Creator
;163 Date
;164 Folder name
;165 Folder path
;166 Folder
;167 Participants
;168 Path
;169 Contact names
;170 Entry type
;171 Language
;172 Date visited
;173 Description
;174 Link status
;175 Link target
;176 URL
;177 Media created
;178 Date released
;179 Encoded by
;180 Producers
;181 Publisher
;182 Subtitle
;183 User web URL
;184 Writers
;185 Attachments
;186 Bcc addresses
;187 Bcc names
;188 Cc addresses
;189 Cc names
;190 Conversation ID
;191 Date received
;192 Date sent
;193 From addresses
;194 From names
;195 Has attachments
;196 Sender address
;197 Sender name
;198 Store
;199 To addresses
;200 To do title
;201 To names
;202 Mileage
;203 Album artist
;204 Beats-per-minute
;205 Composers
;206 Initial key
;207 Mood
;208 Part of set
;209 Period
;210 Color
;211 Parental rating
;212 Parental rating reason
;213 Space used
;214 EXIF version
;215 Event
;216 Exposure bias
;217 Exposure program
;218 Exposure time
;219 F-stop
;220 Flash mode
;221 Focal length
;222 35mm focal length
;223 ISO speed
;224 Lens maker
;225 Lens model
;226 Light source
;227 Max aperture
;228 Metering mode
;229 Orientation
;230 Program mode
;231 Saturation
;232 Subject distance
;233 White balance
;234 Priority
;235 Project
;236 Channel number
;237 Episode name
;238 Closed captioning
;239 Rerun
;240 SAP
;241 Broadcast date
;242 Program description
;243 Recording time
;244 Station call sign
;245 Station name
;246 Auto summary
;247 Summary
;248 Search ranking
;249 Sensitivity
;250 Shared with
;251 Product name
;252 Product version
;253 Source
;254 Start date
;255 Billing information
;256 Complete
;257 Task owner
;258 Total file size
;259 Legal trademarks
;260 Video compression
;261 Directors
;262 Data rate
;263 Frame height
;264 Frame rate
;265 Frame width
;266 Total bitrate
;
;Windows 7
;------------------------------------------------
;  0 Name
;  1 Size
;  2 Item type
;  3 Date modified
;  4 Date created
;  5 Date accessed
;  6 Attributes
;  7 Offline status
;  8 Offline availability
; 10 Owner
; 11 Kind
; 12 Date taken
; 13 Contributing artists
; 14 Album
; 15 Year
; 16 Genre
; 17 Conductors
; 18 Tags
; 19 Rating
; 20 Authors
; 21 Title
; 22 Subject
; 23 Categories
; 24 Comments
; 25 Copyright
; 26 #
; 27 Length
; 28 Bit rate
; 29 Protected
; 30 Camera model
; 31 Dimensions
; 32 Camera maker
; 33 Company
; 34 File description
; 35 Program name
; 36 Duration
; 37 Is online
; 38 Is recurring
; 39 Location
; 40 Optional attendee addresses
; 41 Optional attendees
; 42 Organizer address
; 43 Organizer name
; 44 Reminder time
; 45 Required attendee addresses
; 46 Required attendees
; 47 Resources
; 48 Meeting status
; 49 Free/busy status
; 50 Total size
; 51 Account name
; 52 Task status
; 53 Computer
; 54 Anniversary
; 55 Assistant's name
; 56 Assistant's phone
; 57 Birthday
; 58 Business address
; 59 Business city
; 60 Business country/region
; 61 Business P.O. box
; 62 Business postal code
; 63 Business state or province
; 64 Business street
; 65 Business fax
; 66 Business home page
; 67 Business phone
; 68 Callback number
; 69 Car phone
; 70 Children
; 71 Company main phone
; 72 Department
; 73 E-mail address
; 74 E-mail2
; 75 E-mail3
; 76 E-mail list
; 77 E-mail display name
; 78 File as
; 79 First name
; 80 Full name
; 81 Gender
; 82 Given name
; 83 Hobbies
; 84 Home address
; 85 Home city
; 86 Home country/region
; 87 Home P.O. box
; 88 Home postal code
; 89 Home state or province
; 90 Home street
; 91 Home fax
; 92 Home phone
; 93 IM addresses
; 94 Initials
; 95 Job title
; 96 Label
; 97 Last name
; 98 Mailing address
; 99 Middle name
;100 Cell phone
;101 Nickname
;102 Office location
;103 Other address
;104 Other city
;105 Other country/region
;106 Other P.O. box
;107 Other postal code
;108 Other state or province
;109 Other street
;110 Pager
;111 Personal title
;112 City
;113 Country/region
;114 P.O. box
;115 Postal code
;116 State or province
;117 Street
;118 Primary e-mail
;119 Primary phone
;120 Profession
;121 Spouse/Partner
;122 Suffix
;123 TTY/TTD phone
;124 Telex
;125 Webpage
;126 Content status
;127 Content type
;128 Date acquired
;129 Date archived
;130 Date completed
;131 Device category
;132 Connected
;133 Discovery method
;134 Friendly name
;135 Local computer
;136 Manufacturer
;137 Model
;138 Paired
;139 Classification
;140 Status
;141 Client ID
;142 Contributors
;143 Content created
;144 Last printed
;145 Date last saved
;146 Division
;147 Document ID
;148 Pages
;149 Slides
;150 Total editing time
;151 Word count
;152 Due date
;153 End date
;154 File count
;155 Filename
;156 File version
;157 Flag color
;158 Flag status
;159 Space free
;160 Bit depth
;161 Horizontal resolution
;162 Width
;163 Vertical resolution
;164 Height
;165 Importance
;166 Is attachment
;167 Is deleted
;168 Encryption status
;169 Has flag
;170 Is completed
;171 Incomplete
;172 Read status
;173 Creators
;174 Date
;175 Folder name
;176 Folder path
;177 Folder
;178 Participants
;179 Path
;180 By location
;181 Type
;182 Contact names
;183 Entry type
;184 Language
;185 Date visited
;186 Description
;187 Link status
;188 Link target
;189 URL
;190 Media created
;191 Date released
;192 Encoded by
;193 Producers
;194 Publisher
;195 Subtitle
;196 User web URL
;197 Writers
;198 Attachments
;199 Bcc addresses
;200 Bcc
;201 Cc addresses
;202 Cc
;203 Conversation ID
;204 Date received
;205 Date sent
;206 From addresses
;207 From
;208 Has attachments
;209 Sender address
;210 Sender name
;211 Store
;212 To addresses
;213 To do title
;214 To
;215 Mileage
;216 Album artist
;217 Album ID
;218 Beats-per-minute
;219 Composers
;220 Initial key
;221 Part of a compilation
;222 Mood
;223 Part of set
;224 Period
;225 Color
;226 Parental rating
;227 Parental rating reason
;228 Space used
;229 EXIF version
;230 Event
;231 Exposure bias
;232 Exposure program
;233 Exposure time
;234 F-stop
;235 Flash mode
;236 Focal length
;237 35mm focal length
;238 ISO speed
;239 Lens maker
;240 Lens model
;241 Light source
;242 Max aperture
;243 Metering mode
;244 Orientation
;245 People
;246 Program mode
;247 Saturation
;248 Subject distance
;249 White balance
;250 Priority
;251 Project
;252 Channel number
;253 Episode name
;254 Closed captioning
;255 Rerun
;256 SAP
;257 Broadcast date
;258 Program description
;259 Recording time
;260 Station call sign
;261 Station name
;262 Summary
;263 Snippets
;264 Auto summary
;265 Search ranking
;266 Sensitivity
