kobycool
-
Total Posts
:
2
- Scores: 0
-
Reward points
:
0
- Joined: 5/13/2006
-
Status: offline
|
writing into file
Saturday, May 13, 2006 8:50 PM
( permalink)
Original message moved by Country73 Reason : Wrong Forum
hi, Im trying to write a simple string into file but the string in file always encircled by inverted commas: I need only the string without this " " The script: tempfile="C:\TEMP.txt" Open tempfile For Output As #1 filetime=FileDateTime(tempfile) write #1,"hello" output file: "hello" I need only the hello thanks Koby
|
|
|
|
DiGiTAL.SkReAM
-
Total Posts
:
1259
- Scores: 7
-
Reward points
:
0
- Joined: 9/7/2005
- Location: Clearwater, FL, USA
-
Status: offline
|
RE: writing into file
Sunday, May 14, 2006 6:59 AM
( permalink)
Your code looks like it was written for use in Visual Basic or Quickbasic... Here's how to do it in vbscript.
Const ForReading = 1
Const forWriting = 2
Const ForAppend = 8
sTempFile = "C:\TEMP.txt"
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.OpenTextFile(sTempFile,forWriting,True)
oFile.WriteLine "Hello"
oFile.Close
"Would you like to touch my monkey?" - Dieter (Mike Meyers) "It is better to die like a tiger, than to live like a pussy." -Master Wong, from Balls of Fury
|
|
|
|
kobycool
-
Total Posts
:
2
- Scores: 0
-
Reward points
:
0
- Joined: 5/13/2006
-
Status: offline
|
RE: writing into file
Sunday, May 14, 2006 5:51 PM
( permalink)
thanks for your answer, but I really didnt mention that Im using Quickbasic, Is there any solution for Quickbasic? thanks Koby
|
|
|
|
DiGiTAL.SkReAM
-
Total Posts
:
1259
- Scores: 7
-
Reward points
:
0
- Joined: 9/7/2005
- Location: Clearwater, FL, USA
-
Status: offline
|
RE: writing into file
Monday, May 15, 2006 3:09 AM
( permalink)
tempfile$ = "c:\temp\temp.txt"
open tempfile$ for append as 1
output$ = "hello"
print #1, output$
close #1
That's as close as I can come, as I don't have QB installed where I am sitting right now.
"Would you like to touch my monkey?" - Dieter (Mike Meyers) "It is better to die like a tiger, than to live like a pussy." -Master Wong, from Balls of Fury
|
|
|
|