Loading ...
Sorry, an error occurred while loading the content.

45127RE: [libertybasic] Re: Rewrite files

Expand Messages
  • Nomps E
    Jun 3, 2012
    • 0 Attachment
      Hello Harry
      Thanks for your informative reply. That was what I was hoping. As I said im my reply to Richard, I am hoping to create a data destroying app for my own use. Your information means that the project is feasible
      Thanks againNomps.

      To: libertybasic@yahoogroups.com
      From: harrybee99@...
      Date: Sat, 2 Jun 2012 20:33:31 +0000
      Subject: [libertybasic] Re: Rewrite files


























      When you OPEN a file, the file will be opened in the path you specify with the file name in the OPEN command -- or in the default directory (the value of DefaultDir$), if you don't specify a path in the OPEN command. Regardless, as long as you keep that file open, whenever you use print #h or put #h to write data to the file, the file will remain in the same location.



      If you use FILEDIALOG to specify the file to open, and use the filename variable you used in the FILEDIALOG command to OPEN the file, then, again, as as long as you keep that file open, whenever you use print #h or put #h to write data to the file, the file will remain in the same location.



      If you close the file, and open a file again to write data to it, you have to re-open same using the same filename and path you last wrote it to.



      That is, Microsoft doesn't do anything with your LB-created and modified files; you write your LB program to do with a file what you want to do with it.



      If you're not talking about files created/opened/modified in a program you're writing with LB, then it depends on the application you're talking about. Most applications, by default, including LB with respect to your LB source code, write a file back to the same location you opened it from unless you specify a different location with a Save As function or configure the application to do otherwise.



      --- In libertybasic@yahoogroups.com, "nomp_e" <libnomps@...> wrote:

      >

      > Hello all

      > Does anyone know whether a file is written back to its same place on the disc after it has been altered or does Microsoft put it back in a different place.

      > Thanks Nomps

      >




















      [Non-text portions of this message have been removed]
    • Show all 5 messages in this topic