I think I have it figured out guys... Thanx for the replies, but here lies the problem.
Can't upload the files to the server, then check using PHP.. if it takes 2 hours to upload then find out that they are duplicate files so the process is stopped, that's just to user unfriendly..
Can't use javascript, potentially there might be a thousand filenames that I have to load in javascript, and compare against.. (or more files!) And java script will taxi your browser, especially if your pc is slower..
So, here is what I think will work.. Again..
use 2 forms.. one contains the files.. the other contains hidden boxes... when I press upload, javascript will fill the hidden boxes with the file names after parsing the path..
Then, the form with hidden boxes submits to popups.. Voila ! popup has the filenames and can be processed with php...
then, if no duplicates are detected, the popup can access javascript functions on the parent that will submit the form with the files... If this works I think it will be quite usefull for many applications..
Thoughts ?