javascript vbscript 寻找 eof
我正在 Windows 2003 上编写 destop 脚本,我需要打开一个文件并查找它的末尾并读取最后一行。 我寻找“寻找”,但没有找到。我看到了 openTextFile 选项,但没有。
我通过打开带有红旗的文件然后逐行读取来实现它。 对于大文件,需要花费一些时间,
有谁知道如何快速完成此操作(在 vb 脚本或 javascript 中)
I am writing a destop script on windows 2003 and I need to open a file and seek to the end of it and read the last line.
I looked for a "seek" but couldn't find. I saw the openTextFile for option but didn't have.
I implement it by openning the file with the red flag and then reading line after line.
With big file it takes a time,
Do any one know how to do this quickly (either in vb script or javascript)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想不出一种简单的方法来做到这一点,除了读取整个文件,分成一个数组并弹出最后一行:
我已经在很多情况下这样做了,它应该比循环更快。
I can't think of a straightforward way to do it except for maybe reading the whole file, splitting into an array and popping the last line off:
I've done this on a number of occasions and it should be faster than a loop.