1 2 Previous Next 19 Replies Latest reply on Apr 21, 2015 10:54 PM by fmpaul

    File Handling

    malachydevlin

      Dear All,

      I feel that I may possibly need a plugin for this requirement and that's ok but I just wanted to make sure there wasn't a native way of doing it.

      My user needs to select a folder on their windows machine and be able to

      1. Search and display the contents (files) within
      2. Search with names & extensions (e.g show just all files beginning with "mal")
      3. Select multiple files and attach to an email (pref into a zip)

      ?

       

      Thankyou

        • 1. Re: File Handling
          Benjamin Fehr

          I feel that I may possibly need a plugin for this requirement and that's ok but I just wanted to make sure there wasn't a native way of doing it.

          If there is a native way, it certainly isn't a easy one

           

          My user needs to select a folder on their windows machine and be able to

          1. Search and display the contents (files) within

          Possible with Monkeybread (MBS-PlugIn), BaseElements, TROI File any many others

           

          1. Search with names & extensions (e.g show just all files beginning with "mal")

          with the Plugs, you would insert names of all files as a listed text. After that, native FMP formulas can be used

           

          1. Select multiple files and attach to an email (pref into a zip)

          You probably have to copy selected files to it's own folder with PlugIn, use a Plug for zip-Compression and have this att.. to the email by adding the path of zipped file into the Script function send Email / Attachements

           

          As this shows, a PlugIn is required for zip-compression at least.

          • 2. Re: File Handling
            nicolai

            +1 efficientbizz - possible, but not easy.

             

            You have two options - VBS/CMD integration. I have done a presentation on scanning and displaying a folder contents using cmd. If you decide to go this route, I am happy to dig it out and send it over. Zipping files is relatively straight forward, unless you are doing ebooks or xls.

             

            If it sounds a bit too much, plugins probably a better option

            • 3. Re: File Handling
              Benjamin Fehr

              If it sounds a bit too much, plugins probably a better option

              my thought

              There are chances that all this tasks can be achieved with VB-Scripts / AppleScripts.

              I once was doodling with zip-compression by WV-with-JavaScript but all I achieved was a FMP generated text, saved as 1 zip-compressed text-document.

              Unfortunately, JS is not my core-discipline but I can imagine there's a lot you can achieve with JS on WV!

              • 4. Re: File Handling
                arehkopf

                I would use a plugin if you need a solution for Mac & Windows.

                i have done that with BaseElements and Scriptmaster.

                Both works fine

                • 5. Re: File Handling
                  Benjamin Fehr

                  I was struggling with BE-Plug 'til I figured out that you have to setVars in order to trigger any BE-Function in a script.

                  I started with a Example file recently:

                  BaseElements_Examples.fmp12.zip

                  • 6. Re: File Handling
                    taylorsharpe

                    Regarding plugins, efficientbizz has several good ones.  Some file manipulation plugins are more feature rich.  MBS and TROI can use an Extension Filter, but Base Elements does not.  With Base Elements, you have to pull it down as an array and loop through it to figure filter, etc.  However, one really nice thing about Base Elements is that it is free.  Some file manipulation plugins don't zip.  I know Base Elements and MBS do, so make sure to select a plugin that also Zips. 

                     

                    Before selecting a plugin, you might want to wait for FM 14 to come out.  It apparently is on the verge of release and if FileMaker goes all 64 bit, many plugins may need re-written and I imagine some will not be.  I'm not sure if this will be an issue or not, but if you wait just a month or two, I bet you'll get your answer.  It would be frustrating to base a solution on a plugin that isn't going to be supported in the future. 

                    • 7. Re: File Handling
                      fmpaul

                      Dear Nicolai,

                       

                      im interested in your information about the CMD options you have made.

                      Could you send me some information you have ?

                       

                      Would be great and appreciate your time digging it out

                       

                      best Paul

                      • 8. Re: File Handling
                        nicolai

                        arehkopf


                        I would use a plugin if you need a solution for Mac & Windows.


                         

                        I would recommend the same if the solution is cross-platform (Mac/PC). If it is the case developer would have to do it in two different ways (VBS/AppleScript or cmd/bash) and maintain both sides later on. Would not stop me, but I have done both before.

                         

                        The OP mentioned that he need solution for Windows.



                        +1 to Taylor Sharpe


                        many plugins may need re-written and I imagine some will not be

                         

                        That's why I am trying not to use plugins. A lot of functionality could be achieved with a bit of extra effort.

                        • 9. Re: File Handling
                          nicolai

                          Paul,

                           

                          The presentation was two years ago, I will have to go through my archives. I will get back to you as soon as I find it.

                           

                          Nicolai

                          • 10. Re: File Handling
                            fmpaul

                            Nicolai,

                             

                            thanx much appreciated ...im developing on a MAC but now i've got several projects on Windows and this might get in handy, also not using plugins.

                             

                            Would be great if you would find something ...if not please also let me know, thanx !!

                             

                            Paul

                            • 11. Re: File Handling
                              Benjamin Fehr

                              many plugins may need re-written

                              I started a inquiry about 64-bit compatibility:

                              - TROI File (and probably others by TROI) √

                              - MonkeyBreadSoftware √

                              - Dacon FileFireAdvc. - an update will be released within next couple of weeks

                              - MyFMButtler - no answer yet. This really screws me if FMP 64-bit should come and they're not ready!

                              - BaseElements √

                              • 12. Re: File Handling
                                user19752

                                Why don't you use explorer?

                                 

                                If want to do it in FM window, it lose seach ability but can open folder

                                Set WebViewer[Go to URL:"file://" & Get(DocumentPath)]

                                then user can select any files usual way, right click and select "Send" "Zip folder"

                                • 13. Re: File Handling
                                  nicolai

                                  user19752 - not bad at all. Just need to get the zip file back to FileMaker

                                  • 14. Re: File Handling
                                    nicolai

                                    fmpaul

                                     

                                    I am still looking for the file I promised, which was based on CMD integration. To keep my word and you from waiting I put something together in VBS. I have to say doing something like this is way easier on a mac! I am posting the file here as this partially answers the original post.

                                     

                                    It is done on FileMaker 12 Windows 8. If you want to move to 11, you will need to redo the import (uses insert from URL). Also I did not test it on anything else, so you might need to edit the script further.

                                     

                                    The script should create two files on user desktop, usually I would do this in FileMaker Temp folder.

                                     

                                    This VB script is a mashup of a few scripts which came through google, I saved links for reference as comments and they look like public domain

                                     

                                    Please note, this is more of a proof of concept (obviously it works happy on my desktop). So expect it to have problems in your environment which you will need to counter.

                                     

                                    First time I ran it, OS asked me to confirm the application, which is Windows Scripting Host. I think this is due to Visual Studio instal on the same computer.

                                     

                                    This is free for all to use, mention me if you can ( unless it burns your client's server down)

                                     

                                    Give me some feedback and let me know if any problem.

                                     

                                    Nicolai

                                    1 2 Previous Next