1 2 Previous Next 19 Replies Latest reply on Dec 4, 2014 8:30 AM by erolst

    Create a folder on Desktop via filemaker?

    jbrown

      Hello all.

       

      I am working on a module that allows teachers to store their lesson plans in a container field as a pdf or word document that can be grabbed by the office manager to give to the substitute teacher. I have the system right now exporting the field contents to the office manager's desktop where she can open it and print it.

      I was wondering if there was a way to actually create a folder on her desktop that would be filled with this specific teacher's information. I'd like the folder to say Duffy_SubPlans (duffy being the teacher) and then inside the folder the actual document or documents.

       

      Is it possible to create a folder on a desktop via filemaker in which documents can be placed?

       

      Thanks

      jb

        • 1. Re: Create a folder on Desktop via filemaker?
          keywords

          If you are using FM12 you can use the external open storage option to specify the storage location.

          • 2. Re: Create a folder on Desktop via filemaker?
            Stephen Huston

            If this is a served solution, selecting Open storage is contrary to FMI's engineers' recommendations. They also state that the contents of the served external containers should be managed by FileMaker rather than being Open, and that entire area of storage should not be accessed directly on the server by users.

             

            I believe there are some plugins which allow folder manipulation on the client, and that might be the way to go to let each user to have their own folder locally, generated from the served file's data.

            • 3. Re: Create a folder on Desktop via filemaker?
              timcimbura

              The free ScriptMaster plug-in from 360Works can create a folder among other things...

              http://www.360works.com/scriptmaster/#modules

               

              CreateFolderThis takes an operating system path as a parameter (for example, /Users/Shared/newFolder or C:\Documents and Settings\MyAccount\newFolder) and creates that folder. It returns a 1 if the folder was created, 0 if it already exists, and an error if the folder does not exist and could not be created. It will create nested subdirectories, so if /Users/Shared existed and you use /Users/Shared/a/b/c as the path, it will create folders a, b, and c.

              You can use the built in FileMaker function Get(DesktopPath) also.

               

              Tim

              1 of 1 people found this helpful
              • 4. Re: Create a folder on Desktop via filemaker?
                jormond

                You can also do this without a plugin using the Send Event (on Windows) script step.

                 

                http://fmrift.wordpress.com/2010/02/03/creating-a-folder-from-filemaker-windows/

                1 of 1 people found this helpful
                • 5. Re: Create a folder on Desktop via filemaker?
                  monkeybreadsoftware

                  If you use our MBS Plugins, you can use the Files.CreateDirectory function. Just one of 1600 functions:

                  http://www.mbsplugins.eu/FilesCreateDirectory.shtml

                  • 6. Re: Create a folder on Desktop via filemaker?
                    gcatnine

                    You can use the FREE plugin from Goya

                    http://www.goya.com.au/baseelements/plugin

                    it is very simple

                    • 7. Re: Create a folder on Desktop via filemaker?
                      PeterWindle

                      and, it's very good.

                      • 8. Re: Create a folder on Desktop via filemaker?
                        s

                        If on a Mac, you can do it with Perform Applescript and this calculation:

                         

                        "do shell script \"mkdir " & 

                        Let ( [

                        dt =  Get ( DesktopPath );

                        sd = Get(SystemDrive) ;

                        folder=Get(AccountName)  & "_SubPlans";

                        thepath = Substitute ( dt ; sd ; "" ) ;

                        thewholething="/" & thepath  & folder & "\""

                        ] ;

                        thewholething

                        )

                         

                         

                        I'm assuming that get(accountname) is the teacher surname (Duffy) or you could use an existing field if you have one with the teacher surname. The only problem is that it doesn't work with spaces in the folder or path name. Perhaps someone more clever has a better way of escaping the spaces.

                         

                        --

                        Steve Moore

                        Cumberland, Maine

                        • 9. Re: Create a folder on Desktop via filemaker?
                          jbrown

                          Hey all,

                          These are great ideas.

                          I actually haven't delved too much into the world of plugins yet. I should start for the hosted solution. I don't know if that Scriptmaster plugin can be installed in a hosted solution to give everyone access to the capabilities.

                           

                          Josh. I'll take a look at the post you linked to. That seems interesting as well.

                           

                          And I'll take a look at the Goya plugin on this.

                           

                          Thanks all.

                          • 10. Re: Create a folder on Desktop via filemaker?
                            sporobolus

                            on 2013-07-13 5:01 s wrote

                            The only problem is that it doesn't work with spaces in the folder or path name.

                             

                            a little simpler, and won't fail on user folders that have spaces in the name;

                            but will still fail if there's a space in the result of Get(AccountName); note

                            "-p" keeps mkdir from raising an error if the directory already exists

                             

                            Let([
                                 folder_to_create = Get(AccountName)  & "_SubPlans";
                                 shell_script = "mkdir -p ~/Desktop/" & folder_to_create
                               ];
                               "do shell script " & Quote(shell_script)
                            )
                            

                             

                            or completely space-safe:

                             

                               "set hfs_desktop to (path to desktop folder) as string¶
                               set hfs_subfolder to hfs_desktop & \"" & Get(AccountName)  & "_SubPlans\"¶
                               set posix_subfolder to quoted form of posix path of hfs_subfolder¶
                               do shell script \"mkdir -p \" & posix_subfolder"
                            

                             

                            • 11. Re: Create a folder on Desktop via filemaker?
                              taylorsharpe

                              ScriptMaster and BaseElements plugins are free, which is great and I use both of them.  Lately I have been makingmore use of the MonkeyBread Software plugin due to its depth (1100+ functions), but it is not free.  All of these plugins and quite a few others will do what you need. 

                               

                              What you should do is on the startup script, you need to check and see if the client machine has the plugin you want to use.  If not, then you have the Install Plugin script step install the plugin so that it can be used by that client machine.  Do it all in the startup script so that the end user doesn't even know it is being installed and it happens automatically.  Then you will have that functionality available to all of your scripts. 

                              • 12. Re: Create a folder on Desktop via filemaker?
                                jbrown

                                I really need to sit down and explore working with Plugins. To this point I haven't really done much with them. I'm sure I'll find that using plug ins is equivalent to using the LET statement: How did I ever program without it?

                                 

                                Taylor, where are the plugins stored then: on the server or in the file that i'm developing on (the file that everyone opens)?  Do you know of good resources to help me understand plugins better?

                                jb

                                • 13. Re: Create a folder on Desktop via filemaker?
                                  taylorsharpe

                                  You need to create a table in your solution for plugins that has the plugin name, version, and a container field that you store the plugin.  The startup script step can verify if the plugin is not installed or if the one installed is an old version and then if appropriate, it can use the Install Plugin script step to save the plugin from the container field down into the FileMaker's Extensions folder of the client machine so that the client can begin using the plugin.  Pretty nifty and happens all automatically so that end users don't have to know anything about plugins.  For them, it just works! 

                                   

                                  There are some purists who do anything to avoid using plugins and do so means your solution is the most portable.  There are always issues if future versions of FileMaker won't be compatible with a plugin or if a plugin developer goes belly up and quits supporting the plugin.  However, plugins bring lots of additional functionality not natively in filemaker from manipulation to credit card processing to image manipulation to hashing and ciphers and much more.  So it really opens up some cool possiblilities. 

                                  • 14. Re: Create a folder on Desktop via filemaker?
                                    taylorsharpe

                                    One more thing, on the plugin table, you'll need two entries for each plugin, a Mac version and a Windows version and a field identifying which is which. 

                                    1 2 Previous Next