5 Replies Latest reply on Feb 23, 2013 8:46 AM by JimMac

    Overwriting a copy of the DB with the same name

      Title

      Overwriting a copy of the DB with the same name

      Post

           I am trying to 'save a copy' of my current active database to a drop box folder which will be used as another back up. I want the script to run at the end of the day, and over write the previous copy alrerady in the dropbox folder. I have written this script here Let ( [ F = Get ( FilePath ) ] ;"mydatabase"  & ".fmp12" ) // Let ]

           but it wont let me overwrite the prev copy of the file of the same name. Is there any way of getting round this? 
           I am using a mac. I havento worked out how to save a file to another folder other then on the desktop, not the 24hr timing..any help on this would be great too. The dropbox folder will also be on a mac server...
            

        • 1. Re: Overwriting a copy of the DB with the same name
          JimMac

               I am Mac also.  No files are ever "overwritten".surprise

          You, the programmer, must first Delete the old file, then save the new file.  That may sound silly, but it is true.  There is no automatic Delete/Save procedure.

               Jim...

          • 2. Re: Overwriting a copy of the DB with the same name

                 Bummer - will have to work something else out as i think the 1gb data allowance (free) in dropbox may run out pretty quickly!

                 Btw, Iwill eventually put the database on my new server but I am unsure how i would write the path to it in a script from a client computer...

                 Assuming my db file is in a folder called 'database' which will be located in the documents folder on the server, how would i write this up?

                 Many thanks

                  

            • 3. Re: Overwriting a copy of the DB with the same name
              JimMac

                   I depends on what your are trying to do with the "file path".  Why save files on the client computers? Then they have to manage them.  Most of the external file stuff I do, can be made relative to the Server DB.

                   Try FMP help ... with this search .... files and folders

                   Note the both Windows and MacOS have a prenamed folder called "Documents", which is a common location on all platforms on a "Client" computer.

                   Jim...

              • 4. Re: Overwriting a copy of the DB with the same name

                     Sorry - I meant that when the uses are usng the database, I want them to be able to create a new folder on the server - but I need to able to tell the FM program where the folder is and what machine - in this case the server. I shall look up files and folders as you suggest anyway.
                     One last thing - Although we are a small company (6 computers/users) is it worth getting fm server? What would be the advantages and is it easy to set up?

                     Thank you

                • 5. Re: Overwriting a copy of the DB with the same name
                  JimMac

                       If you make all  of your folders, relative to the Server or HOST db, then it will always "follow the leader" so to speak.

                       There is a good guide on HOSTing versus Server in the Knowlege Base.  I have done both, and once set up, perfomance is same.  The Server has many advantages in maintenance.

                       Jim...

                       PS: Creating folders from several Client computer will result in the need to do a "clean up" eventually.  So putting them in a Folder to isolate them may be helpful...