forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Question about BINFILE

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
flypaper
Contributor
Contributor


Joined: 19 Oct 2001
Posts: 104

PostPosted: Thu Mar 28, 2002 2:59 pm    Post subject: Question about BINFILE Reply with quote

It doesn't appear that I can use both CREATE and WRITE in the same BINFILE COMMAND. Am I doing something wrong? Should this work?
Code:

BINFILE OPEN, 1, @path(%0)log.txt,CREATE|WRITE
BINFILE WRITE, 1, TEXT, Log file created at @DATETIME(h:nn am/pm) on @DATETIME(M/D/YY).
BINFILE CLOSE, 1
Back to top
View user's profile Send private message
VDSuser
Contributor
Contributor


Joined: 21 Mar 2002
Posts: 58
Location: Somewhere in time

PostPosted: Sat Mar 30, 2002 4:49 pm    Post subject: Reply with quote

I assume LOG.TXT is purely an example as TXT files generally aren't binary.

Edit your first line to read "BINFILE OPEN, 1, @path(%0)log.txt,CREATE" to create and open the LOG.TXT file, then use your BINFILE WRITE statement to write to it.

If LOG.TXT already exists, don't use CREATE.

The VDS Help instruction "BINFILE OPEN,<file_id>,<filename>,READ|WRITE|CREATE" means you can use READ or WRITE or CREATE as a mode. (You can open a binary file to Read it, open a binary file to Write to it, or open a binary file to Create it if it doesn't exist.) You can't use more than one mode when OPENing.

Hope this helps. Very Happy
Back to top
View user's profile Send private message
flypaper
Contributor
Contributor


Joined: 19 Oct 2001
Posts: 104

PostPosted: Sun Mar 31, 2002 12:50 pm    Post subject: Reply with quote

Well color me dumb. Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group