Reading Userdefined Properties of files

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Kobaltauge
Posts: 264
Joined: 09 Mar 2019, 01:52
Location: Germany
Contact:

Reading Userdefined Properties of files

22 Mar 2019, 02:15

Hello!

I want to read the userdefined properties from files in a specific folder. I found this skipt in the archived forum and it works properly.
https://autohotkey.com/board/topic/69137-extended-file-properties-modifying-and-saving/

Unfortunately it only reads the "standard" properties, but I need the information of the userdefined (SAPName).
user_def.png
user_def.png (14.55 KiB) Viewed 517 times
I modified the skript to this:

Code: Select all

folder := "c:\temp\"
Loop Files, %folder%\*.sldprt, R  ; Recurse into subfolders.
{
	objShell := ComObjCreate("Shell.Application")
	objFolder := objShell.NameSpace(folder)
	objFolderItem := objFolder.ParseName(A_LoopFileName)
	loop, 500
	{
		property := objFolder.GetDetailsOf(objFolder.Items, A_Index)
		if property = SAPName
		{
			propertyitem := objFolder.GetDetailsOf(objFolderItem, A_Index)
			properties := A_Index . " " .  objFolder.GetDetailsOf(objFolder.Items, A_Index) . ":`t " . propertyitem . "`n"
			msgbox % properties
			IfMsgBox, No
				break
		}
	}
	MsgBox, 4, , nächstes`n`nContinue?
	IfMsgBox, No
		break
}	
Thanks in advance.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 200 guests