Re: File Creation
From: McKirahan (News_at_McKirahan.com)
Date: 06/03/04
- Next message: wayne: "Can a script as a question?"
- Previous message: Evertjan.: "Re: File Creation"
- In reply to: Boby wilson: "Re: File Creation"
- Next in thread: Torgeir Bakken \(MVP\): "Re: File Creation"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 03 Jun 2004 20:53:01 GMT
"Boby wilson" <anonymous@discussions.microsoft.com> wrote in message
news:65C8BED1-CB4D-4987-83A0-7690886FE656@microsoft.com...
> My problem is that:
> Set objFSO = CreateObject("Scripting.FileSystemObject")
> Set objFile = objFSO.CreateTextFile("C:\foldername\filename.txt")
>
>
> create automatcaly in the "C:" drive of the server and not on the c drive
of the client what i want to do
Try it in the following manner:
<html>
<head>
<title>CreateFile.htm</title>
<script type="text/vbscript">
Sub CreateFile()
Const cTXT = "C:\temp\objFSO.txt"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objCTF = objFSO.CreateTextFile(cTXT)
Set objOTF = Nothing
Set objFSO = Nothing
End Sub
</script>
</head>
<body onload="CreateFile()">
</body>
</html>
You will get a security dialog that states:
"An ActiveX control on this page might be unsafe to
interact with other parts of the page. Do you want to
allow this interaction?"
- Next message: wayne: "Can a script as a question?"
- Previous message: Evertjan.: "Re: File Creation"
- In reply to: Boby wilson: "Re: File Creation"
- Next in thread: Torgeir Bakken \(MVP\): "Re: File Creation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|