File Exists - Help Needed 
Author Message
 File Exists - Help Needed

I am trying to use VBScript to detect if a file exists on the local system (Ex: Laptop).  Basically, I am designing a page that will work offline and I want this page to display a link to a file but only if that file exists.  I already know the name and location of the file on the local system.

Following is the sample code that I have written so far:

<title>Testing FileExists</title>
Dim fso 'File system object
Set fso = CreateObject("Scripting.FileSystemObject")
IF (fso.FileExists("c:\temp\test\test.bat")) THEN
   <a href="file:c:/temp/test/test.bat">Execute Bat File</a>

Following are the two problems that I am having:

1. The link to the file does not appear on my page even though c:\temp\test\test.bat exists
2. I get a popup warning message saying "An ActiveX control on this page might be unsafe to interact with other parts of the page. Do you want to allow this interaction?" Is it possible to suppress this message?

Any help would be greatly appreciated.



Mon, 26 Jul 2004 23:57:36 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Which cheap, reliable database to use with Delphi?

2. Need to check if file exist, and execute application if yes

3. File existing or not existing?

4. Need help with Internet - HTML (CGI files)

5. files exists or not - says that it doesn't exist

6. Need help with an Existing Word document

7. Help Need control of an existing setup.exe.

8. need help copying existing Access table with VB5

9. Need help with accessing existing objects....

10. Help needed in finding out if a datafile exists

11. Need help on ACOS function that does not exist in evb

12. Help in changing existing PS file


Powered by phpBB® Forum Software