Skip navigation
Scott - TNC
Currently Being Moderated

Is there a maximum size or limit of text file when storing and transferring data?

Jan 25, 2012 9:35 AM

Hi -


We've been using WriteExtFile and AppendExtFile to store data in a CSV text file in a data folder in the same location as our Authorware executable file.


  WriteExtFile("data\\"^"Variable_Names.txt", Survey_Variable_Names)

  AppendExtFile("data\\Survey_DATA.txt", Survey_Data)


As a rule, we've always put our executable files on the hard drive of the computer (C:) because of some problems we have had with an inconsistent network drive in the past.  Having the files on the C: drive eliminated any network issues.  Our accumulating data would always be stored to the C: drive as well.


We now need to store a backup copy of the data on a server, in addition to the C: drive.


My question is: Is there is a maximum file size that can be 'read in' and then 'written' using Authorware?


My thought was to use ReadExtFile to read in the contents of the "Survey_DATA.txt" file and then use WriteExtFile to write out that same data to a drive on the network, appending the date and time to the end of the file name to serve as a backup file.


I've used this logic, which is working to write to the network drive "P":


  WriteExtFile("P:\\Survey_Project\\BackupData\\DATA_BACKUP_"^Backup_Da te^"_"^Backup_Time^".txt", Survey_Backup_Data)


Naturally, the size of the original data text file on the C: drive is going to continue to grow since we are using 'AppendExtFile' to add the data from each survey record to the data file (CSV, each record on it's own line).  So the size of the file that we are going to read back in (using ReadExtFile) will also continue to grow.


Is there a limit to what we can read in, and then write back out?





  • Currently Being Moderated
    Jan 25, 2012 10:10 AM   in reply to Scott - TNC

    Limit on the text file? I seem to remember that XP had a 64k limit on txt

    files, but that was years ago, and I would have tought it had been

    inclreased by now. Definitely Vista and Windows 7 don't have that same



    As for Authorware variables, theres the old 32k limit stuill hanging

    around. You can store up to 512 k of data in an Authorware 7 variable, but

    ReadExtFile only supports 32k.


    There's various ways that you can read in the text in chunks, but I think,

    ultimately, it is easier to use a database if you want to store and

    retrieve a lot of text.



    Mark as:
  • Currently Being Moderated
    Jan 25, 2012 10:28 AM   in reply to Scott - TNC

    I don't think there's write limit, since it is an append, rather that a



    CopyFile is built right into Authorware...



    Mark as:
  • Currently Being Moderated
    Jan 25, 2012 12:09 PM   in reply to Scott - TNC

    My apologies, it's been a few years ...


    CopyFile is a function that you can load from the WinAPI.u32


    Once loaded, you use it like this


    Success:= CopyFile(FileLocation^"Sourcefile.txt",



    just remember you need to include WinAPI.u32 with your packaged file(s).



    Mark as:
  • Currently Being Moderated
    Jan 25, 2012 2:08 PM   in reply to Scott - TNC

    I don't believe there is a practical limit. If you have the fun(!) od

    supporting XP, you might encounter a 2Gb limit, but if your file is ever

    that big, you have other issues ...


    JumpOutReturn(FileLoction, "FileName.bat")


    should run the Bat file. many system security settings will prevent you

    running a Bat file.



    Mark as:
  • Currently Being Moderated
    Jan 26, 2012 11:06 AM   in reply to Scott - TNC

    Wonderful!!  :-D  just be sure to test the Bat file on your target

    machines. Anyone without admin rights, or with any reasonable security in

    place may not be able to run your Bat command.



    Mark as:
  • Currently Being Moderated
    Jun 4, 2012 4:21 PM   in reply to Scott - TNC

    I don't have Authorware handy - is there  a CopyFolder function? I don;t

    think so.


    I'm pretty sure BudAPI has a CopyFolder function


    If, like me, you prefer native only functions, you can use Catalog to get a

    list of files in a folder, then iterate through the list of returned files

    and copy them in turn. Since you are only taking about text files, this

    should be pretty quick.



    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points