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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

API to write to a text file

Status
Not open for further replies.

Fursten

Programmer
Dec 27, 2000
403
PT
Hi,

I can create a text file and write to him using API, however, I cannot jump to a new line of that file... Is there any API that able us to say "write to a new line?".

thanks
 
Might I enquire why you particularly want to use the API for this?

I only ask because VB has the perfectly usable FileSystemObject that allows you to do this (play with text files) quite happily.
 
HI,

For instance, to write to a log file (create it and write to him). I never has used FileSystemObject and I think that with API it would run more rapidly...

However, I would need to, for instance see what was the last log file to be created, so the FileSystemObject could be one choise...

Is there any easily why to see waht was the las file created (imagine that all files in a directory are like: day/month/year/randomnumber = exemplae: 0305200102 So I would like to create 0305200103...Is this possible to do with filesystemobjects?

Thank you
 
Hi,

Its really easy, simply write the return value to the file; vbCrLf or Chr(13) and Chr(16).

LuCkY
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top