Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check if file exists

Status
Not open for further replies.

lowbk

Technical User
Nov 26, 2001
162
SG
how to check if a file exists before writing it to the server?

in case that is not clear, i have a form written in jsp, when user clicks the "save" button after filling in the form and specifying a filename, servlet will create the file and write to the server. thus i need to check the existence of the filename.

i tried using the File object but i think it is for Netscape and it doesn't use URL path.

any kind sould pls advise
 
Hi lowbk,
I dont think that u can access client machine to check whether the file exists which the user wants to upload to ur server through HTML/JavaScript. You will have to download an Applet to client browser if u want to access his machine.
O !!
 
lowbk, you can intergerate the filesystem from javascript using the fileSystemObject()

you can minuplate files , folders, drivers and more.
 
jaydakissx22, how to use fileSystemObject()? is there any website you can recommend to show examples on usage?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top