You don't have to check for type of operation system to use proper slash. Class File provide separator which automaticaly detect OS and apply relevant slash.
For example if your file return absolute path as C:\Test to create new File you do
which will return then absolute path as C:\Test\fileName.In case of unix file return absolute path home/Test return would be home/Test/fileName
Sun tutorial aviable here
I'm not clear how you retrive the files from user pc, but once you get file source destination which you can have as File or String(in case of String you have to create new File out of it) you call method getName()
whitch return String with the name of your file
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.