2 Replies Latest reply on Jun 8, 2016 3:55 PM by BenKreunen

    CMD batch file export and auto open issue

    BenKreunen

      Product and version Filemaker Pro (32bit), Filemaker Advanced (32bit) v14.04, 14.05

      OS and version    Windows 7 x64 SP1

      Hardware Various, max age 3yrs, min RAM 8Gb

      Description 

      CMD batch files aren't working correctly when exported with "Automatically open file" option if filenames or directory paths include a hyphen. Running batch file manually after export works. Opening batch file after export with Send Event also works.  Scripts including these steps have been running for several years. Suspect this may be related to a Windows update.

       

      How to replicate

      CMD batch files generated via a calculation field and exported using a script as XML ( http://files.digitisation.unimelb.edu.au/xsl/singlefield_list-utf8.xsl ) to create a plain text .bat, using "Automatically open file" option with export.

      If directory path or filename in a command line contains a "-", other command line options are incorrectly interpreted and the operation fails

      • Double clicking on the exported batch file results in successful execution
      • Opening batch file via Send Event script step results in successful execution
      • Renaming directories/files to exclude hyphens results in successful execution

       

       

      Sample commandline:

      convert "Y:\Grainger-Museum\UDS2016215_(Grainger)\UDS2016215-1\TIFF\UDS2016215-1-0003.tif" -depth 8 -resample 200 -compress JPEG2000 -quality 33 -unsharp 1.5x1+0.7+0.02 "o:\processed\UDS2016215-1-0003.pdf"

       

      Results in invalid option -resample

       

       

      Workaround (if any)

      Edit export script to export file with "Automatically open file" unchecked and adding a "Send Event" step to open the file.

        • 1. Re: CMD batch file export and auto open issue
          TSPigeon

          BenKreunen:

           

          Thank you for your post!

           

          FileMaker 14 software started being much more picky about File Names and Paths that it would work with. Any non-alphanumeric character may cause an issue (aside of an underscore "_"). Rather than using hyphens "-" you might use the Underscore "_" or an Alpha-Numeric Character.  This should allow the software to recognize the path/file name to open it.

           

          I hope this helps and let me know if you have any further issue!

           

          TSPigeon

          FileMaker, Inc.

          • 2. Re: CMD batch file export and auto open issue
            BenKreunen

            It doesn't really help because FileMaker is not dealing with the file names, these are in the batch file, so it's CMD that's screwing up the commands. (batch file exported to filewin:c:/temp/fmtemp.bat). The issue only occurs if the batch file is opened automatically as part of the export process. Opening the same batch file via any other method works correctly It would appear that there is something different in the way CMD is called in this situation.

             

            (and changing the naming schema of digital archives containing hundreds of thousands of files is not a trivial workaround)

             

            I have a functional workaround so it'll just be a case of running reports on all my databases to locate similar script steps and modifying them to open the file after exporting.