Okay, I created a small iLogic rule that does this for you, you just need to point it too the right directory, change the value marked in red.
To run the rule create a empty part file, create a new iLogic rule and paste the code. Adjust the text marked in red and your ready.
Imports System.IO
Sub Main
' Set the directory
Dim oDirectoryPath As String
oDirectoryPath = "C:\Temp\"
' Get the directory info
Dim oDirectoryInfo As New DirectoryInfo(oDirectoryPath)
' Create collection to hold all part files from the directory
Dim oFiles As IO.FileInfo()
oFiles = oDirectoryInfo.GetFiles("*ipt")
' Set a counter for the end message
Dim oCount As Integer = 0
' Set reference to the inventor documents
Dim oDocs As Documents
oDocs = ThisApplication.Documents
' Loop all the files
For Each oFile As FileInfo In oFiles
' Set reference to the file
Dim oDoc As PartDocument
oDoc = oDocs.Open(oFile.FullName, True)
' Set the appearance Source Type
oDoc.AppearanceSourceType = AppearanceSourceTypeEnum.kMaterialAppearance
' Save the document
oDoc.Save
' Close the document
oDoc.Close
' Add to the counter
oCount += 1
Next
' Finish message
MsgBox("Number of files processed = " & oCount)
End Sub
Sorry if I spoiled the fun of writing the code yourself? It seemed to me you were asking more for a solution than help writing the code. ( correct me if i'm wrong )
NOTE this code only works for part files that have read/write permissions ( so files checked-in into vault will cause an error, if the files are vaulted please check them out before running the code )
Please kudo if this post was helpfull
Please accept as solution if your problem was solved
Inventor 2014 SP2