Auto Scan Directories after upload

I have created a windowsXP wizard but the pictures aren't available till I login and scan directories.

Without digging thru all the code could you tell me which function does the scan so I can add it to my program.

thanks