2 Replies Latest reply on Dec 10, 2009 2:44 PM by hbrendel

    Auto creation of folders on server

    mfl666

      Title

      Auto creation of folders on server

      Post

      Trying to determine why the folders don't get created in the coded directory.

      To set the stage I am running on a MAC OS X 10.5.8, also have only been using Filemaker since about August.

      I have 2 scripts one being a copy of the original,which has been modified and is used to test the script.

      The original script has been disabled in the calling script and the modified one only runs under my user ID.

      I've run the script using the debugger and all statements execute as far as I can see and yet folders are not created.

      The variables were created by another "Developer".

      The original script is as follows.....


       07 : Ignition: 07-0100 > Create Program Folders

       

      #Create the program folder with the ID number as the name
      Set Variable [ $programfolder; Value:"Groups:ERP: Documents: Programs:" ]
      Set Variable [ $$skippy; Value:<Function Missing>( " -Unused " ; $programfolder & Programs:: Program_ID_Serial_Number) ]
      Set Variable [ $$skippysub; Value:$programfolder & Programs:: Program_ID_Serial_Number & ":" ]
      //  Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programfolder & Programs::
      Program_ID_Serial_Number) ]
      //  Set Field [ Programs:: Program_Folder_Name; <Function Missing>( "-Unused" ; "chmod 775" ) ]
      //  Set Variable [ $programSUBfolder; Value:$programfolder & Programs:: Program_ID_Serial_Number & ":" ]
      #Create the sub folders in the program
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Accounting" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_BW" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Color" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Colorways" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Creation_Files" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Imagery" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Line_Sheet" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Main_Label" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Patterns" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Presentation" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Logistics" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Mail_Attachments" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Misc" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Photos" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Program" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Sales" ) ]
      Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programSUBfolder & Programs:: Program_ID_Serial_Number & "_Styles" ) ]


      The modified script looks like this...........

       


      07 : Ignition: 07-0100 > Create Program Folders Copy

       


      #Create the program folder with the ID number as the name
      Set Variable [ $programfolder; Value:"myfolder:Documents: Programs:" ]
      Set Variable [ $$skippy; Value:<Function Missing>( " -Unused " ; $programfolder & Programs:: Program_ID_Serial_Number) ]
      Set Variable [ $$skippysub; Value:$programfolder & Programs::Program_ID_Serial_Number & ":" ]
      //  Set Field [ Programs:: Program_Folder_Name; <Function Missing>( " -Unused " ; $programfolder & Programs:: Program_ID_Serial_Number) ]
      //  Set Field [ Programs:: Program_Folder_Name; <Function Missing>( "-Unused" ; "chmod 775" ) ]
      Set Variable [ $programSUBfolder; Value:$programfolder & Programs:: Program_ID_Serial_Number & ":" ]
      #Create the sub folders in the program
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Accounting" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_BW" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Color" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Colorways" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Creation_Files" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Imagery" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Line_Sheet" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Main_Label" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Patterns" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Art_Presentation" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Logistics" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Mail_Attachments" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Misc" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Photos" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Program" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Sales" ) ]
      Set Field [ Programs:: Program_Folder_Name; ($programSUBfolder & Programs:: Program_ID_Serial_Number & "_Styles" ) ]

       


      I know that when I try to edit the lines with <Function Missing> I get some criptic FM error message.

       

      What is the "-Unused" trying to do.

      Why is the original issuing the "chmod 775" command.

       

      Any help would be greatly appreciated.

      Michael

       

      P.S. There are a few other issues I have with FM but thats for another time and place.

       

       

       

























        • 1. Re: Auto creation of folders on server
          TSGal

          MichaelL:

           

          Thank you for your post.

           

          Which version of FileMaker Pro are you using?  If you are using a version of FileMaker Pro prior to version 10, and the script was created in version 10 using a function that does not exist in previous versions of FileMaker Pro, or if the original file had a custom function that does not exist in this file, then you would get a <Function Missing> error message.

           

          "chmod 775" is used to set a folder/file to read/write privileges.

           

          I'll need more information about your version of FileMaker Pro and/or custom functions being used before I can proceed further.

           

          TSGal

          FileMaker, Inc. 

          • 2. Re: Auto creation of folders on server
            hbrendel
               It seems to me that the missing function is coming from Troi File plug-in, which is typically used for the creating of folders.