Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working with Text files... 1

Status
Not open for further replies.

CCortez

Programmer
Sep 18, 2000
16
BR
When I use this code:

Open "file.txt" for Binary as #1
Put #1, ,"string of test" & chr(9) & "other string"

The file.txt is created with several characters before the string "string of test".
I don't want those characters, only the strings, and the tab ( chr(9) ). There are some way of solve this trouble.
Thanks,

Claudio [sig][/sig]
 
have you tried &quot;For Output&quot; rather than binary? [sig]<p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>Making mistakes, so you don't have to. &lt;grin&gt;[/sig]
 
Thanks, Mike.
I tried Output and Write. But the commas, generated by Write function, are a trouble to me...
I'd like data without commas...

Claudio [sig][/sig]
 
Open &quot;C:\test.txt&quot; for output As #1

Print #1, &quot;string of test&quot; & Chr(9) & &quot;other string&quot;

Close #1

The exact contents of the file will be:

string of test other string

[sig]<p>Ruairi<br><a href=mailto:ruairi@logsoftware.com>ruairi@logsoftware.com</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top