Click here to Skip to main content
15,879,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
Can anyone help me how to find a 'file' with a specified path is exists in the client system or not ?
(Think i'm a beginner)
Thank You In Before.
Posted
Updated 9-Jun-15 23:49pm
v2

You can't do this for security reasons.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 10-Jun-15 5:57am    
Sure, a 5.
—SA
You can't in practice: Server systems do not have direct access to client hardware - they have to go via the browser.

While it is in theory possible, in practice it won't work: In order to do it, your client will have to be running IE. No other browser will let you do it. Then, IE has to be configured to allow you to send it an ActiveX control (and this is disabled by default). Then IE has to run the ActiveX control (and this is set to "get permissions from the user first, and warn him that this is potentially a dangerous thing to do" by default).
And then...you can write the ActiveX control.

Even if you could find out, it wouldn't do you any good as you can't access the file to do anything with it from the server anyway.

Think about it: if you had the access you'd need, so would everyone else - including malicious sites...
 
Share this answer
 
Comments
Raj 0203 10-Jun-15 7:27am    
Thank you for the response.
Anyway i just need to find the files existence, and i don't have anything to do with that file.
OriginalGriff 10-Jun-15 7:46am    
Doesn't matter: checking for existance of a file can give information about what environment the client browser is running in, so it's a security no-no.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900