CMD batch file export and auto open issue

Discussion created by BenKreunen on Jun 7, 2016
Latest reply on Jun 8, 2016 by 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


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 ( ) 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.