Visual Basic Development Bookmark and Share   
 Home > Visual Basic Language > EOF in Vbscript ?
 

EOF in Vbscript ?

I have the following code :

1. set readfile = filesys.OpenTextFile("c:\somefile2.txt", 1, false)
2. contents = readfile.ReadLine

The above line works only if i have datas in the file. If the file is empty, then i will get error in line 2. I have check for eof. In Visual Basic, EOF works.

But in VbScript, it wont work. What should i use in vbscript ?

Please help me in this regard.

RajaGanapathy  Wednesday, January 03, 2007 12:16 PM
ahmedilyas  Friday, January 05, 2007 8:47 PM

Hi,

You may find an answer at.>>

http://www.w3schools.com/vbscript/default.asp

Regards,

S_DS

John Anthony Oliver  Wednesday, January 03, 2007 7:57 PM

Hi S_DS,

I couldnt able to find the stuff over there !

RajaGanapathy  Friday, January 05, 2007 5:34 AM
ahmedilyas  Friday, January 05, 2007 8:47 PM

You can use google to search for other answers

Custom Search

More Threads

• Saving without prompting
• using fonts
• Make windows recognize my filetype + more...
• How can I check the time/Date of anther PC in a LAN
• Possible? Listbox with collection of User controls as collection
• How to open a dialog dynamically
• VB.net2005 dll not working in VB6 ActiveX
• Displaying data
• Is there a faster image loading process?
• I'm having trouble with a Insert Snipet (Express 2008)