Forum Moderators: open
i can run a report to pull out the "studentID" and the matching "UPN" but is there anyway to match that then with the filename and replace it with the StudentID>>>
some kind of patch processing?
[i]'open db connection[/i]
Set cnn = CreateObject("ADODB.Connection")
cnn.Open *your_db_connection_string*
[i]'query database[/i]
Set rst = cnn.Execute(*your_sql_query*)
[i]'get file system object[/i]
Set fso = CreateObject("Scripting.FileSystemObject")
[i]'loop thru recordset[/i]
Do While Not rst.EOF
[i]'rename image file[/i]
fso.MoveFile *your_file_path* & rst("UPN") & ".jpg", *your_file_path* & rst("SID") & ".jpg"
rst.MoveNext
Loop