Jump to content
Sign in to follow this  
BayuMalmsteen

Open File

Recommended Posts

BayuMalmsteen

I want to try to read file, but the error when i try to call fileread($file,$count) when the count is over 99999999 can you solve me?

Share this post


Link to post
Share on other sites
Andreik

I want to try to read file, but the error when i try to call fileread($file,$count) when the count is over 99999999 can you solve me?

I created a file with 100000000 characters and then I have read 100000000 characters and FileRead work fine.

Be sure that your file have 99999999 characters. This file should be almost 100 Mb.

$DATA = ""
For $INDEX = 1 To 100000000
    $DATA &= "A"
Next

$FILE = FileOpen(@ScriptDir & "\BigFile.txt",2)
FileWrite($FILE,$DATA)
FileClose($FILE)

$FILE = FileOpen(@ScriptDir & "\BigFile.txt",0)
$DATA = FileRead($FILE,100000000)
FileClose($FILE)
MsgBox(0,"",$DATA)
Edited by Andreik

When the words fail... music speaks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.