Check file in JavaScript
-
Hi guys. How can i check Wheather file exist in paricular location or not i saw some example but its not working. Your answer would be helpful for me... Thanks Shafiq
TRY it out
function CheckFile()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
FileExist = fso.FileExists("TEST.txt");
if (FileExist == true){
alert("True")
}
else
{
alert("FAIL");
}
}Rating always..... WELCOME Be a good listener...Because Opprtunity knoughts softly...N-Joy
-
TRY it out
function CheckFile()
{
var fso = new ActiveXObject("Scripting.FileSystemObject");
FileExist = fso.FileExists("TEST.txt");
if (FileExist == true){
alert("True")
}
else
{
alert("FAIL");
}
}Rating always..... WELCOME Be a good listener...Because Opprtunity knoughts softly...N-Joy
Hey koolprasad Thanks for reply. I already tried this it works only in case of IE (after change security setting in internet option Activexcontrol safe enable=enable which is not safe) and in another browser its not working... what i am missing or what i need to do to work in all browser, without change in setting becouse client is not going to change in setting. please share ur Idea Thanks... Shafiq
-
Hi guys. How can i check Wheather file exist in paricular location or not i saw some example but its not working. Your answer would be helpful for me... Thanks Shafiq
You can not access client file, unless you use Activex and give special permission. Just think what could happen if javascript are allowed to access client files.
Yusuf May I help you?