Uploader works, but name trouble

Hi there, I made this little uploader thingy and it works okay.
Now I build a check in the php uploader script that if the file already exists, the integer behind the uploaded file gets raised.

So, if someone uploads “file.swf” there wil be a file on the server with the name “file0.swf”
If anyone else also uploads a file named “file.swf” there will be a “file0.swf and file1.swf”

After uploading you can click a link in the swf to the uploaded file, but the swf doesnt know if there allready excisted a file with the same name.

by default I link to fileName0.extention (file0.swf) but how can i detect with my swf if the file allready existed, so the name is now changed ?

is there some line of code that does something like sendAndLoad, but then with uploadAndLoad (for example)

I hope I made myself clear since my english isnt that great:crazy: