Another FileSystemObject Question 
Author Message
 Another FileSystemObject Question

I put the following code in an ASP page :

....
 Set Fs = Createobject("Scripting.FileSystemObject")
 Set CurFile = Fs.CreateTextFile("C:\GRETA\EXOS.DAT",True)
....

but the file is always created on the server instead of the client. Someone
told me to remove the "Server" keyword before "CreateObject"; now it's done
and it still don't wanna work...
How can I tell the ASP page to create that file on the client ??

Thanx in advance,
Mika?l.



Fri, 08 Nov 2002 03:00:00 GMT  
 Another FileSystemObject Question
ASP-code is executed BEFORE the page is sent to the client.
So, it's simply *not* possible to do something on the client-side from
ASP-code.

Your code must be placed between script-tags

<script language="VBScript">
  Set Fs = Createobject("Scripting.FileSystemObject")
  Set CurFile = Fs.CreateTextFile("C:\GRETA\EXOS.DAT",True)
</script>

this will be executed on the client under the following restrictions (at
least) ...

1) vbscript = IE-explorer only ! (but you should be able to do similar
things from Javascript).
2) The client must allow you to create Active-x components (not marked as
safe).

Good luck
Rudy Steyaert


Quote:
> I put the following code in an ASP page :

> ....
>  Set Fs = Createobject("Scripting.FileSystemObject")
>  Set CurFile = Fs.CreateTextFile("C:\GRETA\EXOS.DAT",True)
> ....

> but the file is always created on the server instead of the client.
Someone
> told me to remove the "Server" keyword before "CreateObject"; now it's
done
> and it still don't wanna work...
> How can I tell the ASP page to create that file on the client ??

> Thanx in advance,
> Mika?l.



Fri, 08 Nov 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. FileSystemObject question

2. FileSystemObject Question

3. A fileSystemObject Question

4. FileSystemObject Question

5. FileSystemObject Question

6. FileSystemObject question.

7. Newbie FileSystemObject question

8. 1st posting - FileSystemObject question

9. Scripting.FileSystemObject question

10. FileSystemObject Question

11. A newbie FileSystemObject Question

12. FileSystemObject Question

 

 
Powered by phpBB® Forum Software