4 Replies Latest reply on Jun 15, 2006 12:58 AM by Newsgroup_User

    Overwritre files with Buddy Api

    StuckInYork
      Hi!

      I am trying to use the Buddy API to move files. I am using the MoveFileOn Reboot function which works fine normally. However I really need it to overwrite a file that is in the target folder with one with the same name. This does not happen, I guess the xtra won't overwrite files with the same name. Has anyone come across this and found away round it? Got a bit of a nightmare if not.

      Cheers in anticipation,

      Simon
        • 1. Re: Overwritre files with Buddy Api
          Level 7

          Result = baCopyFile( SourceFile , DestFile , Overwrite )
          .
          .
          .
          "Always" always copies the file
          "IfNewer" copies the file if SourceFile is newer than DestFile
          "IfNotExist" copies only if DestFile does not already exist

          hth
          scott


          StuckInYork wrote:
          > Hi!
          >
          > I am trying to use the Buddy API to move files. I am using the MoveFileOn
          > Reboot function which works fine normally. However I really need it to
          > overwrite a file that is in the target folder with one with the same name. This
          > does not happen, I guess the xtra won't overwrite files with the same name. Has
          > anyone come across this and found away round it? Got a bit of a nightmare if
          > not.
          >
          > Cheers in anticipation,
          >
          > Simon
          >
          • 2. Re: Overwritre files with Buddy Api
            Level 7
            > Result = baCopyFile( SourceFile , DestFile , Overwrite )

            But he can't use that function since the file copied is in use while
            logged on and needs to be moved on reboot (before the system loads it).

            Perhaps you could/should drop a line to the xtra developer and ask him
            for suggestions, or ideally an update that takes an 'overwrite' parameter
            • 3. Re: Overwritre files with Buddy Api
              Level 7
              I see...
              You probably should rethink what you are trying to do....
              Why do you need to overwrite a file that is in use?
              Would a data base be another option?
              Could you hold the entire file in memory then write it out on stopmovie?
              Or, just open it and write to it on StopMovie?

              i got nothin,
              scott


              Sean Wilson wrote:
              >> Result = baCopyFile( SourceFile , DestFile , Overwrite )
              >
              > But he can't use that function since the file copied is in use while
              > logged on and needs to be moved on reboot (before the system loads it).
              >
              > Perhaps you could/should drop a line to the xtra developer and ask him
              > for suggestions, or ideally an update that takes an 'overwrite' parameter
              • 4. Re: Overwritre files with Buddy Api
                Level 7
                StuckInYork wrote:
                > I am trying to use the Buddy API to move files. I am using the
                > MoveFileOn Reboot function which works fine normally. However I
                > really need it to overwrite a file that is in the target folder with
                > one with the same name. This does not happen, I guess the xtra won't
                > overwrite files with the same name. Has anyone come across this and
                > found away round it? Got a bit of a nightmare if not.

                What if you use baMoveOnReboot to delete the current file before moving
                the new one there?

                Andrew